* [PATCH] gpio: stmpe: pass DT node to irqdomain
@ 2013-03-01 12:01 Linus Walleij
2013-03-02 9:23 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2013-03-01 12:01 UTC (permalink / raw)
To: Grant Likely, linux-kernel
Cc: Anmar Oueja, Gabriel Fernandez, stable, Linus Walleij
From: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
The irq domain was implemented but the device tree
node was not transmitted to irq_domain_add_simple().
Cc: stable@vger.kernel.org
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpio/gpio-stmpe.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 770476a..73b691c 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -309,9 +309,11 @@ static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = {
static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio)
{
- int base = stmpe_gpio->irq_base;
+ int base = 0;
+ if (!stmpe_gpio->chip.of_node)
+ base = stmpe_gpio->irq_base;
- stmpe_gpio->domain = irq_domain_add_simple(NULL,
+ stmpe_gpio->domain = irq_domain_add_simple(stmpe_gpio->chip.of_node,
stmpe_gpio->chip.ngpio, base,
&stmpe_gpio_irq_simple_ops, stmpe_gpio);
if (!stmpe_gpio->domain) {
@@ -346,6 +348,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
stmpe_gpio->chip = template_chip;
stmpe_gpio->chip.ngpio = stmpe->num_gpios;
stmpe_gpio->chip.dev = &pdev->dev;
+ stmpe_gpio->chip.of_node = np;
stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1;
if (pdata)
--
1.7.11.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: stmpe: pass DT node to irqdomain
2013-03-01 12:01 [PATCH] gpio: stmpe: pass DT node to irqdomain Linus Walleij
@ 2013-03-02 9:23 ` Grant Likely
2013-03-04 2:23 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2013-03-02 9:23 UTC (permalink / raw)
To: Linus Walleij, linux-kernel
Cc: Anmar Oueja, Gabriel Fernandez, stable, Linus Walleij
On Fri, 1 Mar 2013 13:01:42 +0100, Linus Walleij <linus.walleij@stericsson.com> wrote:
> From: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
>
> The irq domain was implemented but the device tree
> node was not transmitted to irq_domain_add_simple().
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Applied, thanks.
I've got a small branch of fixes that I need to send to Linus for v3.9,
and then I'll leave the rest of the bug fixes to you.
g.
> ---
> drivers/gpio/gpio-stmpe.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
> index 770476a..73b691c 100644
> --- a/drivers/gpio/gpio-stmpe.c
> +++ b/drivers/gpio/gpio-stmpe.c
> @@ -309,9 +309,11 @@ static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = {
>
> static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio)
> {
> - int base = stmpe_gpio->irq_base;
> + int base = 0;
> + if (!stmpe_gpio->chip.of_node)
> + base = stmpe_gpio->irq_base;
>
> - stmpe_gpio->domain = irq_domain_add_simple(NULL,
> + stmpe_gpio->domain = irq_domain_add_simple(stmpe_gpio->chip.of_node,
> stmpe_gpio->chip.ngpio, base,
> &stmpe_gpio_irq_simple_ops, stmpe_gpio);
> if (!stmpe_gpio->domain) {
> @@ -346,6 +348,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
> stmpe_gpio->chip = template_chip;
> stmpe_gpio->chip.ngpio = stmpe->num_gpios;
> stmpe_gpio->chip.dev = &pdev->dev;
> + stmpe_gpio->chip.of_node = np;
> stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1;
>
> if (pdata)
> --
> 1.7.11.3
>
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: stmpe: pass DT node to irqdomain
2013-03-02 9:23 ` Grant Likely
@ 2013-03-04 2:23 ` Grant Likely
2013-03-04 2:34 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2013-03-04 2:23 UTC (permalink / raw)
To: Linus Walleij, linux-kernel
Cc: Anmar Oueja, Gabriel Fernandez, stable, Linus Walleij
On Sat, 02 Mar 2013 09:23:09 +0000, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Fri, 1 Mar 2013 13:01:42 +0100, Linus Walleij <linus.walleij@stericsson.com> wrote:
> > From: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
> >
> > The irq domain was implemented but the device tree
> > node was not transmitted to irq_domain_add_simple().
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Applied, thanks.
>
> I've got a small branch of fixes that I need to send to Linus for v3.9,
> and then I'll leave the rest of the bug fixes to you.
This patch breaks for CONFIG_OF=n. I've dropped it and it will need to be reposted.
g.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: stmpe: pass DT node to irqdomain
2013-03-04 2:23 ` Grant Likely
@ 2013-03-04 2:34 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-03-04 2:34 UTC (permalink / raw)
To: Grant Likely
Cc: Linus Walleij, linux-kernel, Anmar Oueja, Gabriel Fernandez, stable
On Mon, Mar 4, 2013 at 3:23 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Sat, 02 Mar 2013 09:23:09 +0000, Grant Likely <grant.likely@secretlab.ca> wrote:
>> Applied, thanks.
>>
>> I've got a small branch of fixes that I need to send to Linus for v3.9,
>> and then I'll leave the rest of the bug fixes to you.
>
> This patch breaks for CONFIG_OF=n. I've dropped it and it will need to be reposted.
Yeah :-/
I posted a reply to the linux-next build failure with some question
on how we make the OF integration less errorprone, it's currenly
way to easy to cause things like this because of missing #ifdefs
for non-OF platforms.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-04 2:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 12:01 [PATCH] gpio: stmpe: pass DT node to irqdomain Linus Walleij
2013-03-02 9:23 ` Grant Likely
2013-03-04 2:23 ` Grant Likely
2013-03-04 2:34 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.