Skip to content
Snippets Groups Projects
Commit 745915aa authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Tom Rini
Browse files

gpio: pca953x_gpio: fix DT GPIO flags translation


Commit fb01e07a 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: default avatarAnatolij Gustschin <agust@denx.de>
Cc: Mario Six <mario.six@gdsys.cc>
parent cbabe7f8
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment