[U-Boot] [PATCH] gpio: pca953x_gpio: fix DT GPIO flags translation
Anatolij Gustschin
agust at denx.de
Thu Oct 18 14:15:39 UTC 2018
Commit fb01e07a95 accidentally broke initialisation of GPIO
descriptor flags from device tree: currently the active low
flag from gpio-specifier is always ignored. Fix it.
Signed-off-by: Anatolij Gustschin <agust at denx.de>
Cc: Mario Six <mario.six at gdsys.cc>
---
drivers/gpio/pca953x_gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index 535b2f12ea..0bb484498a 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -227,7 +227,7 @@ static int pca953x_xlate(struct udevice *dev, struct gpio_desc *desc,
struct ofnode_phandle_args *args)
{
desc->offset = args->args[0];
- desc->flags = args->args[1] & (GPIO_ACTIVE_LOW ? GPIOD_ACTIVE_LOW : 0);
+ desc->flags = args->args[1] & GPIO_ACTIVE_LOW ? GPIOD_ACTIVE_LOW : 0;
return 0;
}
--
2.17.1
More information about the U-Boot
mailing list