lkml.org 
[lkml]   [2012]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] gpio/tegra: convert to use linear irqdomain
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?


\
 
 \ /
  Last update: 2012-10-17 21:01    [W:0.075 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site