Skip to content

Commit

Permalink
gpio: pca953x_gpio: fix DT GPIO flags translation
Browse files Browse the repository at this point in the history
Commit fb01e07 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>
  • Loading branch information
vdsao authored and nsdrude committed Jun 24, 2022
1 parent a3ca1e7 commit 191561c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/pca953x_gpio.c
Expand Up @@ -248,7 +248,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;
}
Expand Down

0 comments on commit 191561c

Please sign in to comment.