Re: [PATCH 1/2] ledtrig-gpio: Request user input pin as GPIO

2019-05-17 Thread Uwe Kleine-König
Cc: += linux-g...@vger.kernel.org On Thu, May 16, 2019 at 02:42:08PM -0700, Kun Yi wrote: > The ledtrig-gpio logic assumes the input pin can be directly converted > to IRQ using gpio_to_irq. This is problematic since there is no > guarantee on the pinmux function nor the direction of the pin.

[PATCH 1/2] ledtrig-gpio: Request user input pin as GPIO

2019-05-16 Thread Kun Yi
The ledtrig-gpio logic assumes the input pin can be directly converted to IRQ using gpio_to_irq. This is problematic since there is no guarantee on the pinmux function nor the direction of the pin. Request the pin as an input GPIO before requesting it as an IRQ. Tested: a free pin can be