From patchwork Fri Mar 21 09:42:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 26795 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0480720143 for ; Fri, 21 Mar 2014 09:42:56 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wo20sf7988080obc.6 for ; Fri, 21 Mar 2014 02:42:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=ygdFVDkEdGewo/MORjnlD2TkcE3jAwVqQM4x6wN4k+E=; b=TOHziANuYtt5+dYTwvX+WbywicWU5wdvPAWE+axCfkQJANSDIHJYLv7bCb0R43VqtA 3uU31dr54Fi1jK42dEMzyEToucjvFFUQtAyyDeG4sf8tmkDqXIihwWWpDQzfkeDRtJqQ FxxOvKq/UPrcofFGcqYNCU7LwhEHglpQaxR2QKjxtPGa0oCjPqbg0EBnoLB/6y/VPJw9 AN/4T4yhhKPQA/WBO82dp/iVZ1omB707Tp+0Xn6VMOSwdKkKvpTdCkIPGZjHyybmV1MW 1ZJ+xdD+LbD6fBbYJ/t8i4TQ4DqbMmjh3hrA2v9bI8Do1NwPAGy7ivdKD4G5x22nCtgO ks0w== X-Gm-Message-State: ALoCoQmDWr5OUP519zb2L4lhxBursvIJR+McKtS3/0jecLTkF797+4Ei4vmDmhX43JVSWQvbQyA0 X-Received: by 10.50.114.134 with SMTP id jg6mr795993igb.2.1395394976483; Fri, 21 Mar 2014 02:42:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.80 with SMTP id w74ls600936qgd.95.gmail; Fri, 21 Mar 2014 02:42:56 -0700 (PDT) X-Received: by 10.58.54.35 with SMTP id g3mr189183vep.46.1395394976376; Fri, 21 Mar 2014 02:42:56 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id sv2si1053771vdc.39.2014.03.21.02.42.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 02:42:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id im17so2335118vcb.9 for ; Fri, 21 Mar 2014 02:42:56 -0700 (PDT) X-Received: by 10.220.161.8 with SMTP id p8mr36752238vcx.4.1395394976288; Fri, 21 Mar 2014 02:42:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp17615vck; Fri, 21 Mar 2014 02:42:55 -0700 (PDT) X-Received: by 10.66.139.100 with SMTP id qx4mr31010005pab.141.1395394975366; Fri, 21 Mar 2014 02:42:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si3315956pbc.329.2014.03.21.02.42.54; Fri, 21 Mar 2014 02:42:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760670AbaCUJmd (ORCPT + 26 others); Fri, 21 Mar 2014 05:42:33 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:52831 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760576AbaCUJm2 (ORCPT ); Fri, 21 Mar 2014 05:42:28 -0400 Received: by mail-we0-f174.google.com with SMTP id t60so1420789wes.33 for ; Fri, 21 Mar 2014 02:42:27 -0700 (PDT) X-Received: by 10.180.165.238 with SMTP id zb14mr1617484wib.51.1395394947640; Fri, 21 Mar 2014 02:42:27 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id co9sm11818689wjb.22.2014.03.21.02.42.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Mar 2014 02:42:26 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH 1/2] pinctrl: nomadik: rename secondary to latent Date: Fri, 21 Mar 2014 10:42:17 +0100 Message-Id: <1395394937-31503-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.5.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The "secondary irq" in the nomadik pin control driver is actually not secondary (as in: can occur any time alongside the ordinary irq), it is a latent IRQ. It is an IRQ that has occurred when the system was in sleep state and has been cached in a special register flagged from the low power management unit (PRCM). Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index cec7762cf335..ee6a8ca264fc 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -254,7 +254,7 @@ struct nmk_gpio_platform_data { int first_gpio; int first_irq; int num_gpio; - u32 (*get_secondary_status)(unsigned int bank); + u32 (*get_latent_status)(unsigned int bank); void (*set_ioforce)(bool enable); bool supports_sleepmode; }; @@ -266,8 +266,8 @@ struct nmk_gpio_chip { struct clk *clk; unsigned int bank; unsigned int parent_irq; - int secondary_parent_irq; - u32 (*get_secondary_status)(unsigned int bank); + int latent_parent_irq; + u32 (*get_latent_status)(unsigned int bank); void (*set_ioforce)(bool enable); spinlock_t lock; bool sleepmode; @@ -909,11 +909,11 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) __nmk_gpio_irq_handler(irq, desc, status); } -static void nmk_gpio_secondary_irq_handler(unsigned int irq, +static void nmk_gpio_latent_irq_handler(unsigned int irq, struct irq_desc *desc) { struct nmk_gpio_chip *nmk_chip = irq_get_handler_data(irq); - u32 status = nmk_chip->get_secondary_status(nmk_chip->bank); + u32 status = nmk_chip->get_latent_status(nmk_chip->bank); __nmk_gpio_irq_handler(irq, desc, status); } @@ -923,10 +923,10 @@ static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) irq_set_chained_handler(nmk_chip->parent_irq, nmk_gpio_irq_handler); irq_set_handler_data(nmk_chip->parent_irq, nmk_chip); - if (nmk_chip->secondary_parent_irq >= 0) { - irq_set_chained_handler(nmk_chip->secondary_parent_irq, - nmk_gpio_secondary_irq_handler); - irq_set_handler_data(nmk_chip->secondary_parent_irq, nmk_chip); + if (nmk_chip->latent_parent_irq >= 0) { + irq_set_chained_handler(nmk_chip->latent_parent_irq, + nmk_gpio_latent_irq_handler); + irq_set_handler_data(nmk_chip->latent_parent_irq, nmk_chip); } return 0; @@ -1246,7 +1246,7 @@ static int nmk_gpio_probe(struct platform_device *dev) struct gpio_chip *chip; struct resource *res; struct clk *clk; - int secondary_irq; + int latent_irq; void __iomem *base; int irq; int ret; @@ -1270,8 +1270,8 @@ static int nmk_gpio_probe(struct platform_device *dev) if (irq < 0) return irq; - secondary_irq = platform_get_irq(dev, 1); - if (secondary_irq >= 0 && !pdata->get_secondary_status) + latent_irq = platform_get_irq(dev, 1); + if (latent_irq >= 0 && !pdata->get_latent_status) return -EINVAL; res = platform_get_resource(dev, IORESOURCE_MEM, 0); @@ -1297,8 +1297,8 @@ static int nmk_gpio_probe(struct platform_device *dev) nmk_chip->addr = base; nmk_chip->chip = nmk_gpio_template; nmk_chip->parent_irq = irq; - nmk_chip->secondary_parent_irq = secondary_irq; - nmk_chip->get_secondary_status = pdata->get_secondary_status; + nmk_chip->latent_parent_irq = latent_irq; + nmk_chip->get_latent_status = pdata->get_latent_status; nmk_chip->set_ioforce = pdata->set_ioforce; nmk_chip->sleepmode = pdata->supports_sleepmode; spin_lock_init(&nmk_chip->lock);