From: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Andrey Smirnov
<andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 02/13] gpio-sx150x: Remove 'irq_summary' parameter
Date: Mon, 17 Oct 2016 07:26:57 -0700 [thread overview]
Message-ID: <1476714428-11264-3-git-send-email-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <1476714428-11264-1-git-send-email-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Information conveyed by 'irq_summary' paramter can be obtained from
struct i2c_client's irq field. Remove any uses of the former and replace
it with the latter.
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/gpio/gpio-sx150x.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/drivers/gpio/gpio-sx150x.c b/drivers/gpio/gpio-sx150x.c
index f9d6bec..e80c115 100644
--- a/drivers/gpio/gpio-sx150x.c
+++ b/drivers/gpio/gpio-sx150x.c
@@ -105,12 +105,6 @@ struct sx150x_device_data {
* the polarity of that IO line, while clearing it results
* in normal polarity. For chips with fewer than 16 IO pins,
* high-end bits are ignored.
- * @irq_summary: The 'summary IRQ' line to which the GPIO expander's INT line
- * is connected, via which it reports interrupt events
- * across all GPIO lines. This must be a real,
- * pre-existing IRQ line.
- * Setting this value < 0 disables the irq_chip functionality
- * of the driver.
* @irq_base: The first 'virtual IRQ' line at which our block of GPIO-based
* IRQ lines will appear. Similarly to gpio_base, the expander
* will create a block of irqs beginning at this number.
@@ -124,7 +118,6 @@ struct sx150x_platform_data {
u16 io_pullup_ena;
u16 io_pulldn_ena;
u16 io_polarity;
- int irq_summary;
unsigned irq_base;
bool reset_during_probe;
};
@@ -133,7 +126,6 @@ struct sx150x_chip {
struct gpio_chip gpio_chip;
struct i2c_client *client;
const struct sx150x_device_data *dev_cfg;
- int irq_summary;
int irq_base;
int irq_update;
u32 irq_sense;
@@ -598,7 +590,6 @@ static void sx150x_init_chip(struct sx150x_chip *chip,
chip->irq_chip.irq_set_type = sx150x_irq_set_type;
chip->irq_chip.irq_bus_lock = sx150x_irq_bus_lock;
chip->irq_chip.irq_bus_sync_unlock = sx150x_irq_bus_sync_unlock;
- chip->irq_summary = -1;
chip->irq_base = -1;
chip->irq_masked = ~0;
chip->irq_sense = 0;
@@ -699,12 +690,10 @@ static int sx150x_init_hw(struct sx150x_chip *chip,
}
static int sx150x_install_irq_chip(struct sx150x_chip *chip,
- int irq_summary,
- int irq_base)
+ int irq_base)
{
int err;
- chip->irq_summary = irq_summary;
chip->irq_base = irq_base;
/* Add gpio chip to irq subsystem */
@@ -718,11 +707,10 @@ static int sx150x_install_irq_chip(struct sx150x_chip *chip,
}
err = devm_request_threaded_irq(&chip->client->dev,
- irq_summary, NULL, sx150x_irq_thread_fn,
+ chip->client->irq, NULL, sx150x_irq_thread_fn,
IRQF_ONESHOT | IRQF_SHARED | IRQF_TRIGGER_FALLING,
chip->irq_chip.name, chip);
if (err < 0) {
- chip->irq_summary = -1;
chip->irq_base = -1;
}
@@ -759,9 +747,8 @@ static int sx150x_probe(struct i2c_client *client,
if (rc)
return rc;
- if (pdata->irq_summary >= 0) {
+ if (client->irq) {
rc = sx150x_install_irq_chip(chip,
- pdata->irq_summary,
pdata->irq_base);
if (rc < 0)
return rc;
--
2.5.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-10-17 14:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 14:26 [PATCH 00/13] Revamp Semtech SX150x driver Andrey Smirnov
2016-10-17 14:26 ` [PATCH 01/13] gpio-sx150x: Remove 'gpio_base' from pdata Andrey Smirnov
[not found] ` <1476714428-11264-1-git-send-email-andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-10-17 14:26 ` Andrey Smirnov [this message]
2016-10-17 14:27 ` [PATCH 13/13] gpio-sx150x: Pass device type in DT match table Andrey Smirnov
2016-10-17 14:26 ` [PATCH 03/13] gpio-sx150x: Remove 'irq_base' parameter Andrey Smirnov
2016-10-17 14:26 ` [PATCH 04/13] gpio-sx150x: Replace 'io_polarity' with DT binding Andrey Smirnov
2016-10-17 14:27 ` [PATCH 05/13] bindings: gpio-sx150x: Document "semtech,io-polarity" binding Andrey Smirnov
2016-10-18 16:23 ` Rob Herring
2016-10-17 14:27 ` [PATCH 06/13] gpio-sx150x: Replace "io_pull*_ena" with DT bindings Andrey Smirnov
2016-10-17 14:27 ` [PATCH 07/13] bindings: gpio-sx150x: Document "semtech,io-pull*" bindings Andrey Smirnov
2016-10-18 16:25 ` Rob Herring
2016-10-17 14:27 ` [PATCH 08/13] gpio-sx150x: Replace 'reset_during_probe" with DT binding Andrey Smirnov
2016-10-17 14:27 ` [PATCH 09/13] bindings: gpio-sx150x: Document "semtech,reset-during-probe" bindings Andrey Smirnov
2016-10-17 14:27 ` [PATCH 10/13] gpio-sx150x: Replace 'oscio_is_gpio' with DT binding Andrey Smirnov
2016-10-17 14:27 ` [PATCH 11/13] bindings: gpio-sx150x: Document "semtech,oscio-is-gpo" binding Andrey Smirnov
2016-10-17 14:27 ` [PATCH 12/13] gpio-sx150x: Remove struct sx150x_platform_data Andrey Smirnov
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=1476714428-11264-3-git-send-email-andrew.smirnov@gmail.com \
--to=andrew.smirnov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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).