Skip to contentSkip to conversation

gpio: pca953x_gpio: fix DT GPIO flags translation

PATCH In review Anatolij Gustschin 2 participants 2 messages Oct 18, 2018 – Nov 14, 2018 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpio/pca953x_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/pca953x_gpio.c +1 -1
index 535b2f12ea..0bb484498a 100644
@@ -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;
 }
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · Anatolij Gustschin

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181114/32e43086/attachment.sig>