From patchwork Mon Oct 14 11:11:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 176164 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4362572ill; Mon, 14 Oct 2019 04:12:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7JvG0ngEF5QwWEVGiax8kxF1TdD4xfpxVPxXvGHAlvWQjydfBrF/9Cd9foXi7sAOXku1a X-Received: by 2002:a17:906:ce2e:: with SMTP id sd14mr28714021ejb.197.1571051527596; Mon, 14 Oct 2019 04:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571051527; cv=none; d=google.com; s=arc-20160816; b=oR1aKsggH9K+MzNcLncjPNGluLXWJiphYnCEtR8+YUk3UcB2wNPpGnPYoMrkp+gMpW oD7hEPepw2s3roQENbGfruXHasYz5Ykky7AfJSHmLYk8ofgoqrRwPf0TUs9E/cudS1Fa o749PMQ91xKoaSpjMACXL03tXP9rWSNSARegRZgI6uVGlv9rRxFVzpmjLaNF9Nq5Y0xt x0ZLJxmdEV0c6Q8NjzvTMF7efueLzpURQNo52abKWjjeQ7nVvREqX6RhWKDLVJiyDAvO SeKU/Kfve9V6YuQ6uIG7RIEnNFjhhWAQPAHjsQqEIQrDBrxOQ+3VXyi51v91cpl79fzX 2VEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9jY9SO8cAVJjVc5s917aON7QONtf2+N68XWw8wtVhqI=; b=xTX1l3LActgCWdR9ofwgtlJ27JU5zznRdZWhT5jJtUy1069D4zzCcKTqPrlj7AWySn mYOR7viI8mNsmo5q9JwHeEISuPUDTP/gAZ+8SoSD/WV5SSWbFxIR5dhNhkrYDvxj9dGO nSc29b18rMXlcqba3d7dI0pJ/qG8gMIkqL36+yea9GPlTb/BG0N3+v24kCLpIlKnlmGG +5bRGTQhhe1KoAIs/eYoXdW/dYxOsoNzzo/BM9qZATYhNnw37HSgykVKP7sWJnJDJcBQ ybojrxUm/0CePENF9QSOSIwgTIbnd6aCK/R9+DKazP/Y6ILa0KKSsK+84gHuDtAeqFCZ pVfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vTAsqsyc; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b30si12670712eda.200.2019.10.14.04.12.07; Mon, 14 Oct 2019 04:12:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vTAsqsyc; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731817AbfJNLME (ORCPT + 5 others); Mon, 14 Oct 2019 07:12:04 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41834 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731261AbfJNLMD (ORCPT ); Mon, 14 Oct 2019 07:12:03 -0400 Received: by mail-lj1-f193.google.com with SMTP id f5so16205072ljg.8 for ; Mon, 14 Oct 2019 04:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9jY9SO8cAVJjVc5s917aON7QONtf2+N68XWw8wtVhqI=; b=vTAsqsycVsHQn6i7Z+HAWZL4+9eHQh6KvsnLi7sH1GCaosgYrLD1v+3beQPkOgj8EO 7WaUVhUzULIvVG7gSyNIve/N3wP10XbWzb1i2Oh5+AXD3le48d6wl+ekvCJVQROj00QH DSrYUoB+jyfW8+o9Q1iblqKF3dFSs9eMjwH6UmOwi4msUuS2yDi+sZskgtGHQSeY7hKW 9RcX7yV9Prc/FcwRId4ppjef9es8eIPcq11JPZPNWMpNOF9abGqAZS5H06RLaCiZB+gT Oen3gK8y7qd0Ax0YfxKWCVgiu6BRpBPFxU5pmx0f24+CNg8AzA1ZZx60KQKpueOOY1PD /Gkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9jY9SO8cAVJjVc5s917aON7QONtf2+N68XWw8wtVhqI=; b=NlJmtpwyniJBASKJYWK+EakTQEjBMSkdTPJmp5E2BYQe5cLMhwzO7AsPf1vvU3V8uj QvLcG3OkzsDZaki0VgntytnDQU54K5DZfdLHRFCO5oWwMOaFprGBh4IWE5AjrlOhPe9i X6UHTf8K6j/7NHn3Zlr/3A9dCsLgG2ooDBHSMeDgNbyj8H7GqXAyVI1x1AWkVoJA9xV4 BfUqOHvtC9K0dcmoDe6L1CZiGCFriCPFkEUGvIAHouDOplqASrt3yB+pK1oQijLtDyGA g669gIrGgCXN1kSkXzXQYs1DFmAeNQPuNfnAP1Y9zAqOqtsbJkrCZBTY84DhC9vEStKw GzxQ== X-Gm-Message-State: APjAAAXPTrsNKvf3fQWHnMXWPqpooVNZehPxXL0yc3QBTYqC6UXymlCS YjeALo9DGN6ynEqrWoLiK1sYnEVg8tc= X-Received: by 2002:a2e:2b91:: with SMTP id r17mr18564608ljr.1.1571051521113; Mon, 14 Oct 2019 04:12:01 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v1sm4251873lfa.87.2019.10.14.04.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 04:11:59 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Ulf Hansson , Lina Iyer Subject: [PATCH 1/3] pinctrl: nomadik: Drop support for latent IRQ Date: Mon, 14 Oct 2019 13:11:52 +0200 Message-Id: <20191014111154.9731-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The latent IRQs are IRQs that have occurred when the system was down in deep sleep and the GPIO block was powered off. The PRCMU (power reset and control unit) knows which GPIO line offset fired an IRQ to wake the system up (if so desired) and this second IRQ was used to replay the action when the system came back online after suspend(). This is now known to be the wrong approach to solve this problem: in a patch series Lina Iyer has suggested to instead make it possible to model the IRQs as hierarchical with double parents. Also the current device trees do not contain the right information to make this code work, the latent IRQ is not specified nowadays giving noise like this in the console: [ 0.612168] gpio 8012e000.gpio: IRQ index 1 not found [ 0.622523] gpio 8012e080.gpio: IRQ index 1 not found Let's delete the latent IRQ code and reimplement it properly when we need it. Cc: Ulf Hansson Cc: Lina Iyer Signed-off-by: Linus Walleij --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 21 --------------------- 1 file changed, 21 deletions(-) -- 2.21.0 diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index 2a8190b11d10..dc81de15b85e 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -249,8 +249,6 @@ struct nmk_gpio_chip { struct clk *clk; unsigned int bank; unsigned int parent_irq; - int latent_parent_irq; - u32 (*get_latent_status)(unsigned int bank); void (*set_ioforce)(bool enable); spinlock_t lock; bool sleepmode; @@ -832,15 +830,6 @@ static void nmk_gpio_irq_handler(struct irq_desc *desc) __nmk_gpio_irq_handler(desc, status); } -static void nmk_gpio_latent_irq_handler(struct irq_desc *desc) -{ - struct gpio_chip *chip = irq_desc_get_handler_data(desc); - struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(chip); - u32 status = nmk_chip->get_latent_status(nmk_chip->bank); - - __nmk_gpio_irq_handler(desc, status); -} - /* I/O Functions */ static int nmk_gpio_get_dir(struct gpio_chip *chip, unsigned offset) @@ -1104,7 +1093,6 @@ static int nmk_gpio_probe(struct platform_device *dev) struct nmk_gpio_chip *nmk_chip; struct gpio_chip *chip; struct irq_chip *irqchip; - int latent_irq; bool supports_sleepmode; int irq; int ret; @@ -1125,15 +1113,11 @@ static int nmk_gpio_probe(struct platform_device *dev) if (irq < 0) return irq; - /* It's OK for this IRQ not to be present */ - latent_irq = platform_get_irq(dev, 1); - /* * The virt address in nmk_chip->addr is in the nomadik register space, * so we can simply convert the resource address, without remapping */ nmk_chip->parent_irq = irq; - nmk_chip->latent_parent_irq = latent_irq; nmk_chip->sleepmode = supports_sleepmode; spin_lock_init(&nmk_chip->lock); @@ -1194,11 +1178,6 @@ static int nmk_gpio_probe(struct platform_device *dev) irqchip, nmk_chip->parent_irq, nmk_gpio_irq_handler); - if (nmk_chip->latent_parent_irq > 0) - gpiochip_set_chained_irqchip(chip, - irqchip, - nmk_chip->latent_parent_irq, - nmk_gpio_latent_irq_handler); dev_info(&dev->dev, "at address %p\n", nmk_chip->addr);