From: Anatolij Gustschin Date: Thu, 18 Oct 2018 14:15:39 +0000 (+0200) Subject: gpio: pca953x_gpio: fix DT GPIO flags translation X-Git-Tag: v2025.01-rc5-pxa1908~3281 X-Git-Url: http://git.dujemihanovic.xyz/img/%7B%7B%20%24image.RelPermalink%20%7D%7D?a=commitdiff_plain;h=745915aa5975fe7056ce6c89651391624ee1341a;p=u-boot.git 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 Cc: Mario Six --- 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; }