[PATCH] gpio: get function returns masked register value

Sascha Hauer s.hauer at pengutronix.de
Mon Aug 3 15:20:35 EDT 2020


On Fri, Jul 24, 2020 at 12:09:37PM +0100, Renaud Barbier wrote:
> Unlike Linux the generic driver get function returns the masked register
> content and not the 0 or 1 value. The consequence is that gpio_get_value
> returns for instance 0x10 for bit 4 instead of 1.
> Use the Linux normalized form instead.
> 
> Signed-off-by: Renaud Barbier <renaud.barbier at abaco.com>
> ---
>  drivers/gpio/gpio-generic.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to master, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list