From: Linus Walleij <linus.walleij@linaro.org>
To: linux-gpio@vger.kernel.org, Alexandre Courbot <acourbot@nvidia.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>,
Bin Gao <bin.gao@linux.intel.com>
Subject: [PATCH 2/2] gpio: set explicit nesting on drivers
Date: Thu, 24 Nov 2016 13:39:01 +0100 [thread overview]
Message-ID: <1479991141-24202-1-git-send-email-linus.walleij@linaro.org> (raw)
The ADNP, CrystalCove and WhiskeyCove are all nested GPIO
irqchips, but were avoiding to connect the parent IRQ to
the gpiochip. This works, but is kind of sloppy as the
child IRQs are not marked as having the parent IRQ as
parent.
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>
Cc: Bin Gao <bin.gao@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpio/gpio-adnp.c | 2 ++
drivers/gpio/gpio-crystalcove.c | 2 ++
drivers/gpio/gpio-wcove.c | 2 ++
3 files changed, 6 insertions(+)
diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c
index 7a5c0a93e1ff..36b12f5a95b3 100644
--- a/drivers/gpio/gpio-adnp.c
+++ b/drivers/gpio/gpio-adnp.c
@@ -479,6 +479,8 @@ static int adnp_irq_setup(struct adnp *adnp)
return err;
}
+ gpiochip_set_nested_irqchip(chip, &adnp_irq_chip, adnp_irq);
+
return 0;
}
diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c
index d0022d655a09..2197368cc899 100644
--- a/drivers/gpio/gpio-crystalcove.c
+++ b/drivers/gpio/gpio-crystalcove.c
@@ -362,6 +362,8 @@ static int crystalcove_gpio_probe(struct platform_device *pdev)
return retval;
}
+ gpiochip_set_nested_irqchip(&cg->chip, &crystalcove_irqchip, irq);
+
return 0;
}
diff --git a/drivers/gpio/gpio-wcove.c b/drivers/gpio/gpio-wcove.c
index 88f29601f8de..34baee5b1dd6 100644
--- a/drivers/gpio/gpio-wcove.c
+++ b/drivers/gpio/gpio-wcove.c
@@ -446,6 +446,8 @@ static int wcove_gpio_probe(struct platform_device *pdev)
return ret;
}
+ gpiochip_set_nested_irqchip(&wg->chip, &wcove_irqchip, virq);
+
return 0;
}
--
2.7.4
next reply other threads:[~2016-11-24 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 12:39 Linus Walleij [this message]
2016-11-25 14:35 ` [PATCH 2/2] gpio: set explicit nesting on drivers Mika Westerberg
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=1479991141-24202-1-git-send-email-linus.walleij@linaro.org \
--to=linus.walleij@linaro.org \
--cc=acourbot@nvidia.com \
--cc=ajay.thomas.david.rajamanickam@intel.com \
--cc=bin.gao@linux.intel.com \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.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).