From: Stephen Warren <swarren@wwwdotorg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Grant Likely <grant.likely@secretlab.ca>,
Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH 7/7] gpio/tegra: convert to use linear irqdomain
Date: Wed, 17 Oct 2012 12:32:11 -0600 [thread overview]
Message-ID: <507EF9AB.9070603@wwwdotorg.org> (raw)
In-Reply-To: <507DE0AE.7090701@wwwdotorg.org>
On 10/16/2012 04:33 PM, Stephen Warren wrote:
> On 10/16/2012 01:23 PM, Linus Walleij wrote:
>> The MXS driver tries to do the work of irq_domain_add_linear()
>> by reserving a bunch of descriptors somewhere and keeping track
>> of the base offset, then calling irq_domain_add_legacy(). Let's
>> stop doing that and simply use the linear IRQ domain.
>
> This /looks/ fine, but appears to break users of GPIOs from this module,
> and causes a backtrace when cat /sys/kernel/debug/gpio:
...
The following additional diff makes it work:
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index 0234162..c7c175a 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -460,7 +460,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
> gpiochip_add(&tegra_gpio_chip);
>
> for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) {
> - int irq = irq_find_mapping(irq_domain, gpio);
> + int irq = irq_create_mapping(irq_domain, gpio);
> /* No validity check; all Tegra GPIOs are valid IRQs */
>
> bank = &tegra_gpio_banks[GPIO_BANK(gpio)];
I wonder if perhaps the entirety of that loop and perhaps the one after
it should be in the IRQ domain's map op - is that how all this is
intended to work?
next prev parent reply other threads:[~2012-10-17 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 19:23 [PATCH 7/7] gpio/tegra: convert to use linear irqdomain Linus Walleij
2012-10-16 22:33 ` Stephen Warren
2012-10-17 18:32 ` Stephen Warren [this message]
2012-10-19 10:17 ` Linus Walleij
2012-10-18 6:29 ` Shawn Guo
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=507EF9AB.9070603@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=swarren@nvidia.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