diff options
| author | Marek Vasut <[email protected]> | 2025-01-07 23:56:08 +0100 |
|---|---|---|
| committer | Marek Vasut <[email protected]> | 2025-01-09 21:09:05 +0100 |
| commit | addcb09fd507c75cb59c83eeaeb3ccc12a2248c6 (patch) | |
| tree | 79d5a7e5360241672861163855e691e562ba9965 /drivers | |
| parent | b20c51bc45c758e689218e2da73a50f19a5240d8 (diff) | |
usb: ehci-mx6: Use regulator_set_enable_if_allowed
With the commit 4fcba5d556b4 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.
Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.
Based on 335799b7252a ("usb: dwc2: Use regulator_set_enable_if_allowed")
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/usb/host/ehci-mx6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index a93fa5d5455..a8748cef7ad 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -479,9 +479,9 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) { int ret; - ret = regulator_set_enable(priv->vbus_supply, - (type == USB_INIT_DEVICE) ? - false : true); + ret = regulator_set_enable_if_allowed(priv->vbus_supply, + (type == USB_INIT_DEVICE) ? + false : true); if (ret && ret != -ENOSYS) { printf("Error enabling VBUS supply (ret=%i)\n", ret); return ret; |
