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? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/