Re: [PATCH 1/2] Input: gpio-keys: allow drivers to specify whether IRQ can be shared
From: Ferenc Wagner <hidden>
Date: 2009-11-20 10:08:27
Dmitry Torokhov [off-list ref] writes:
On Thu, Nov 19, 2009 at 09:23:45AM +0200, Mika Westerberg wrote:quoted
Added new field to struct gpio_keys_button: exclusive_irq which can be used to specify whether driver wants to have exclusive access to IRQ or can it be shared. By default IRQs for gpio-keys are shareable.I think the idea makes sense with one exception - why limit just to sharing and not let platform specify the exact IRQ flags it needs, defaulting to IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED?
Though I'm all for level triggered GPIO buttons, that would hardly fly without changes in the handler logic. And for the necessary change of polarity one needs GPIO access, and we're back to Arve's as-yet- unanswered question: "If gpio_get_value may sleep, then what is gpio_get_value_cansleep for?" There was also talk about using the nested interrupt infrastructure, but I didn't really get you, and the thread died off without conclusion: http://thread.gmane.org/gmane.linux.kernel.input/8775/focus=9153 I'd appreciate some explanation, if you can afford the time. -- Regards, Feri.