Re: [PATCH v3 3/3] gpiolib: Show correct direction from the beginning

2018-10-02 Thread Timur Tabi
On 10/2/18 3:27 AM, Ricardo Ribalda Delgado wrote: + /* REVISIT: most hardware initializes GPIOs as inputs (often +* with pullups enabled) so power usage is minimized. Linux +* code should set the gpio direction first thing; but until +

Re: [PATCH v3 3/3] gpiolib: Show correct direction from the beginning

2018-10-02 Thread Timur Tabi
On 10/2/18 3:27 AM, Ricardo Ribalda Delgado wrote: + /* REVISIT: most hardware initializes GPIOs as inputs (often +* with pullups enabled) so power usage is minimized. Linux +* code should set the gpio direction first thing; but until +

[PATCH v3 3/3] gpiolib: Show correct direction from the beginning

2018-10-02 Thread Ricardo Ribalda Delgado
Current code assumes that the direction is input if direction_input function is set. This might not be the case on GPIOs with programmable direction. Signed-off-by: Ricardo Ribalda Delgado --- drivers/gpio/gpiolib.c | 33 +++-- 1 file changed, 19 insertions(+), 14

[PATCH v3 3/3] gpiolib: Show correct direction from the beginning

2018-10-02 Thread Ricardo Ribalda Delgado
Current code assumes that the direction is input if direction_input function is set. This might not be the case on GPIOs with programmable direction. Signed-off-by: Ricardo Ribalda Delgado --- drivers/gpio/gpiolib.c | 33 +++-- 1 file changed, 19 insertions(+), 14