]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gpio: pca953x_gpio: fix DT GPIO flags translation
authorAnatolij Gustschin <agust@denx.de>
Thu, 18 Oct 2018 14:15:39 +0000 (16:15 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 14 Nov 2018 15:59:23 +0000 (10:59 -0500)
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>
drivers/gpio/pca953x_gpio.c

index 535b2f12eade9a920357518e6196da3e35ec0edd..0bb484498a8e5f4ad77bb2f2e99ce82ca131d6e6 100644 (file)
@@ -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;
 }