On 04/15/2013 11:53 AM, Stephen Warren wrote: > On 04/13/2013 07:35 PM, Javier Martinez Canillas wrote: > ... >> Is the following inlined patch [1] what you were thinking that would >> be the right approach? > ... >> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c > ... >> +static int omap_gpio_irq_request(struct irq_data *d) >> +{ >> + struct gpio_bank *bank = irq_data_get_irq_chip_data(d); >> + >> + return omap_gpio_request(&bank->chip, d->hwirq); > > If you want the GPIO usage to be known to the GPIO subsystem, then > wouldn't you call gpio_request() here rather than omap_gpio_request()? > The above code will certainly do enough so that the OMAP GPIO HW is > fully enabled as you need, but I thought the idea was to also prevent > some other code successfully running gpio_request() on that same GPIO? Also, although omap gpios default to being inputs, we should not assume that. So may be you should call gpio_request_one() here passing as flags GPIOF_IN to configure as an input. Cheers Jon -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html