From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: linux-gpio@vger.kernel.org
Cc: linus.walleij@linaro.org, narmstrong@baylibre.com,
linux-kernel@vger.kernel.org, cphealy@gmail.com,
Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 12/14] pinctrl-sx150x: Use handle_bad_irq instead of handle_edge_irq
Date: Tue, 1 Nov 2016 08:57:46 -0700 [thread overview]
Message-ID: <1478015868-10309-13-git-send-email-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <1478015868-10309-1-git-send-email-andrew.smirnov@gmail.com>
Althought the function passed as a "handler" during GPIO chip
instantiation is not going to ever be called, specifying handle_edge_irq
there makes for a rather confusing read, both because no "ack" callback
in specified for irqchip and because there's no acking action is
necessary.
Specify handle_bad_irq instead a make a note of the situation. This
commit should be a no-op behaviour wise.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
drivers/pinctrl/pinctrl-sx150x.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
index 741981d..31ed7e3 100644
--- a/drivers/pinctrl/pinctrl-sx150x.c
+++ b/drivers/pinctrl/pinctrl-sx150x.c
@@ -1063,9 +1063,20 @@ static int sx150x_probe(struct i2c_client *client,
pctl->irq.masked = ~0;
pctl->irq.sense = 0;
+ /*
+ * Because sx150x_irq_threaded_fn invokes all of the
+ * nested interrrupt handlers via handle_nested_irq,
+ * any "handler" passed to gpiochip_irqchip_add()
+ * below is going to be ignored, so the choice of the
+ * function does not matter that much.
+ *
+ * We set it to handle_bad_irq to avoid confusion,
+ * 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_edge_irq, IRQ_TYPE_NONE);
+ handle_bad_irq, IRQ_TYPE_NONE);
if (ret) {
dev_err(dev, "could not connect irqchip to gpiochip\n");
return ret;
--
2.5.5
next prev parent reply other threads:[~2016-11-01 15:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 15:57 [PATCH 00/14] pinctrl-sx150x: Various bug-fixes and code simplifications Andrey Smirnov
2016-11-01 15:57 ` [PATCH 01/14] pinctrl-sx150x: Rely on of_modalias_node for OF matching Andrey Smirnov
2016-11-04 12:28 ` Linus Walleij
2016-11-04 20:09 ` Andrey Smirnov
2016-11-04 21:29 ` Linus Walleij
2016-11-01 15:57 ` [PATCH 02/14] pinctrl-sx150x: Add SX1503 specific data Andrey Smirnov
2016-11-01 15:57 ` [PATCH 03/14] pinctrl-sx150x: Replace magic number in sx150x_init_hw Andrey Smirnov
2016-11-01 15:57 ` [PATCH 04/14] pinctrl-sx150x: Fix incorrect constant " Andrey Smirnov
2016-11-01 15:57 ` [PATCH 05/14] pinctrl-sx150x: Move some code out of sx150x_init_hw Andrey Smirnov
2016-11-01 15:57 ` [PATCH 06/14] pinctrl-sx150x: Improve sx150x_init_misc for SX1504/5/6 Andrey Smirnov
2016-11-01 15:57 ` [PATCH 07/14] pinctrl-sx150x: Convert driver to use regmap API Andrey Smirnov
2016-11-01 15:57 ` [PATCH 08/14] pinctrl-sx150x: Replace sx150x_*_cfg by means of " Andrey Smirnov
2016-11-01 15:57 ` [PATCH 09/14] pinctrl-sx150x: Remove excessive locking Andrey Smirnov
2016-11-01 15:57 ` [PATCH 10/14] pinctrl-sx150x: Improve oscio GPIO functions Andrey Smirnov
2016-11-01 15:57 ` [PATCH 11/14] pinctrl-sx150x: Simplify interrupt handler Andrey Smirnov
2016-11-01 15:57 ` Andrey Smirnov [this message]
2016-11-01 15:57 ` [PATCH 13/14] pinctrl-sx150x: Remove magic numbers from sx150x_irq_set_type Andrey Smirnov
2016-11-01 15:57 ` [PATCH 14/14] pinctrl-sx150x: Remove magic numbers from sx150x_reset Andrey Smirnov
2016-11-02 11:01 ` [PATCH 00/14] pinctrl-sx150x: Various bug-fixes and code simplifications Neil Armstrong
2016-11-02 13:33 ` Neil Armstrong
2016-11-03 22:22 ` Andrey Smirnov
2016-11-04 12:17 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478015868-10309-13-git-send-email-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=cphealy@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).