Skip to contentSkip to conversation

usb: dwc3-generic: Ensure reset GPIO is configured as an output

PATCH Applied Peter Korsgaard 2 participants 2 messages Jun 28, 2023 – Jul 2, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc3-generic: Ensure reset GPIO is configured as an output

GPIOD_ACTIVE_LOW is not enough to configure a GPIO as an output, we need GPIOD_IS_OUT as well.

Fixes b252d79b0936d60b ("usb: dwc3: Add support to reset usb ULPI phy")
---
 drivers/usb/dwc3/dwc3-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-generic.c +1 -1
index 66da5a8d6f..35e4b36a69 100644
@@ -105,7 +105,7 @@ static int dwc3_generic_probe(struct udevice *dev,
 	if (CONFIG_IS_ENABLED(DM_GPIO) &&
 	    device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
 		priv->ulpi_reset = devm_gpiod_get_optional(dev->parent, "reset",
-								GPIOD_ACTIVE_LOW);
+							   GPIOD_IS_OUT | GPIOD_ACTIVE_LOW);
 		/* property is optional, don't return error! */
 		if (priv->ulpi_reset) {
 			/* Toggle ulpi to reset the phy. */
Signature · 1 line
2.30.2
Applied
#1 lore raw
Quoted 5 lines · Peter Korsgaard

GPIOD_ACTIVE_LOW is not enough to configure a GPIO as an output, we need GPIOD_IS_OUT as well.

Fixes b252d79b0936d60b ("usb: dwc3: Add support to reset usb ULPI phy")

Applied to usb/master, thanks !