device-tree: at91: irq and gpios: problem while requesting a gpio used as an interrupt source.
Linus Walleij
linus.walleij at linaro.org
Wed Jan 22 05:15:02 EST 2014
On Thu, Jan 16, 2014 at 1:02 PM, Jean-Jacques Hiblot
<jjhiblot at traphandler.com> wrote:
> Linus,
> the root of the issue is the fact that a GPIO can't be requested
> twice. But IMO it's safe for a single device to request it more than
> once and use it for different purposes (irq and electrical signal
> value). Maybe we can rework the GPIO request to include this ownership
> information. I can post a draft implementation for this if you think
> it's worthwhile.
You are right and actually Jean-Christophe's patch is a good
start.
You also need to use the gpio_lock_as_irq() API as shown in
other patches to the subsystem e.g. this.
commit eb7cce1ea96b6399672abce787598f6e7a4352c3
Also check my other mail in this thread.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list