From patchwork Fri Nov 25 14:17:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 84135 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp138245qgi; Fri, 25 Nov 2016 06:19:53 -0800 (PST) X-Received: by 10.99.101.65 with SMTP id z62mr14827841pgb.74.1480083593483; Fri, 25 Nov 2016 06:19:53 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [198.137.202.9]) by mx.google.com with ESMTPS id o21si44872775pgj.240.2016.11.25.06.19.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 06:19:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 198.137.202.9 as permitted sender) client-ip=198.137.202.9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 198.137.202.9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAHKd-0008RM-B7; Fri, 25 Nov 2016 14:18:27 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAHKK-00088h-FG for linux-arm-kernel@lists.infradead.org; Fri, 25 Nov 2016 14:18:12 +0000 Received: by mail-lf0-x22e.google.com with SMTP id t196so51813021lff.3 for ; Fri, 25 Nov 2016 06:17:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Pg7JYZ8TtO6Fj+g72aU4PNVP6RKamo9iedwF9uoexTI=; b=KFqWqIxBTfEXRrhTHd7RzdSMJ8HgrdJh8h9CGcxdGWR9BL0ECtVLpUaZWBl/FZuSW9 hWgDDf5HAaj3Su0vANdBTvjbTXP+gDjWyGw+zZq+PiWWcccBllm4K3lUzxlmxucjeqG3 cJ55S5eFf/MDEwBcHeE8adcFMwOvJN9FS7EFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Pg7JYZ8TtO6Fj+g72aU4PNVP6RKamo9iedwF9uoexTI=; b=QK8wqfBqG59kbC+SoBm9l63vla8thtf7O5tO6LPSZt+ISxF4Cb46aWDK1qHjt6j2ur g08c89j0bvt68cLYHb525hPxlNKyCYZmPv1UPX6ZS8nO3B7ioOi+geuwkBtw+IXgpZkf 47yu605s+aCn+JO6Tjp0VvaGgEnRqCBfw9c+SQCvouaFvGOiklLiN6IGERrc1CPATx/r PjepoZL9qSxd7PSfu1Tpdm80I6mKR/j4Z3EM/IiUz1vbRCki7ccLhP3qX3EEVZ2Exb3B g4guwjFEE490DjwSiNviHoNR8rWhPgt09047SnfVmrNua/2x1KjYngovE/kcNXxinCvv yLLQ== X-Gm-Message-State: AKaTC00xftu75TPozKjYZvAB3ncXOakbCmpdks6u15e47hkJwQbM34PxG0vOzmXNv5ppBnVu X-Received: by 10.46.78.10 with SMTP id c10mr4325000ljb.77.1480083465534; Fri, 25 Nov 2016 06:17:45 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 10sm9365726ljo.36.2016.11.25.06.17.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 06:17:44 -0800 (PST) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] pinctrl: sx150x: use new nested IRQ infrastructure Date: Fri, 25 Nov 2016 15:17:42 +0100 Message-Id: <1480083462-29591-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161125_061808_805415_00FE7B6E X-CRM114-Status: GOOD ( 12.12 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, Linus Walleij MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Use the new gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip() calls to properly created a nested irqchip and mark all child irqs properly with their parent IRQ. Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-sx150x.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c index 1a1c8b51a992..36cb0f1ed538 100644 --- a/drivers/pinctrl/pinctrl-sx150x.c +++ b/drivers/pinctrl/pinctrl-sx150x.c @@ -1219,9 +1219,9 @@ static int sx150x_probe(struct i2c_client *client, * plus it will be instantly noticeable if it is ever * called (should not happen) */ - ret = gpiochip_irqchip_add(&pctl->gpio, - &pctl->irq_chip, 0, - handle_bad_irq, IRQ_TYPE_NONE); + ret = gpiochip_irqchip_add_nested(&pctl->gpio, + &pctl->irq_chip, 0, + handle_bad_irq, IRQ_TYPE_NONE); if (ret) { dev_err(dev, "could not connect irqchip to gpiochip\n"); return ret; @@ -1234,6 +1234,10 @@ static int sx150x_probe(struct i2c_client *client, pctl->irq_chip.name, pctl); if (ret < 0) return ret; + + gpiochip_set_nested_irqchip(&pctl->gpio, + &pctl->irq_chip, + client-irq); } /* Pinctrl_desc */