Skip to contentSkip to conversation

leds: lp55xx: Initialize enable GPIO direction to output

PATCH Applied Doug Zobel 2 participants 2 messages May 10, 2021 – Jun 23, 2021 LED

lore
Share & tools
lore

Doug Zobel

author
#0 lore raw

PATCH 1/1 leds: lp55xx: Initialize enable GPIO direction to output

The "Convert to use GPIO descriptors" commit changed the initialization of the enable GPIO from GPIOF_DIR_OUT to GPIOD_ASIS. This breaks systems where the GPIO does not default to output. Changing the enable initialization to GPIOD_OUT_LOW.

---
 drivers/leds/leds-lp55xx-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-lp55xx-common.c +1 -1
index 81de1346bf5d..d1657c46ee2f 100644
@@ -694,7 +694,7 @@ struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev,
 	of_property_read_u8(np, "clock-mode", &pdata->clock_mode);
 
 	pdata->enable_gpiod = devm_gpiod_get_optional(dev, "enable",
-						      GPIOD_ASIS);
+						      GPIOD_OUT_LOW);
 	if (IS_ERR(pdata->enable_gpiod))
 		return ERR_CAST(pdata->enable_gpiod);
 
Signature · 1 line
2.20.1
Applied
#1 lore raw
Quoted 5 lines · Doug Zobel

The "Convert to use GPIO descriptors" commit changed the initialization of the enable GPIO from GPIOF_DIR_OUT to GPIOD_ASIS. This breaks systems where the GPIO does not default to output. Changing the enable initialization to GPIOD_OUT_LOW.

Thanks, applied.
Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek