diff options
author | Anatolij Gustschin <agust@denx.de> | 2018-10-18 16:15:39 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-14 10:59:23 -0500 |
commit | 745915aa5975fe7056ce6c89651391624ee1341a (patch) | |
tree | a077e258c30844349294f08551df60e57d8a5bf3 | |
parent | cbabe7f87f87c47a2d1e31c4bba1de375e3c85df (diff) | |
download | u-boot-745915aa5975fe7056ce6c89651391624ee1341a.tar.gz u-boot-745915aa5975fe7056ce6c89651391624ee1341a.tar.xz u-boot-745915aa5975fe7056ce6c89651391624ee1341a.zip |
gpio: pca953x_gpio: fix DT GPIO flags translation
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@denx.de>
Cc: Mario Six <mario.six@gdsys.cc>
-rw-r--r-- | drivers/gpio/pca953x_gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |