Thread (18 messages) 18 messages, 7 authors, 2013-02-14

Re: [PATCH] mfd: stmpe: Pull IRQ GPIO number from DT during DT-based probe

From: Laxman Dewangan <ldewangan@nvidia.com>
Date: 2013-01-08 11:18:23
Also in: linux-arm-kernel

On Tuesday 08 January 2013 04:44 PM, Viresh Kumar wrote:
On 8 January 2013 16:41, Lee Jones [off-list ref] wrote:
quoted
quoted
Hmm.. I tried a bit, but couldn't find any such call :(
Probably an assumption is taken here. GPIO pins which are going to be used as
interrupt lines, wouldn't be getting set in output mode at all. So,
once they are put
in input mode in beginning, nobody would change it ever.

Much of gpio controllers configure gpio pins in input mode in their probe().

Maybe, there is something else :)
Pinctrl?
I don't think pinctrl is playing with it. I searched for
"direction_input" string and
pinctrl routine also had similar name. I couldn't fine use of
direction_input anywhere
in kernel, for setting them as irqs for OF cases.
I think we can do it in the gpio chip driver inthe function 
xxx_gpio_irq_set_type().
When you register any irq and if this callback is available from gpio 
chip driver then this will get called. and so the setting the pi to 
input mode as well as putting the pin in GPIO mode can be done here.  
This is what we are doing it in gpio-tegra driver.

Thanks,
Laxman
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help