summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-07-03 20:13:02 +0300
committerPatrice Chotard <patrice.chotard@st.com>2020-07-28 19:00:05 +0300
commit9f9191a10785f96a5bb753f4cd6961cae56c389d (patch)
tree23fe4149ed74e605851e9ef425cfd61e0a9a3fda /drivers/phy
parentded48bec0568c7e94d3ef5ea10b13a46d0fd26a6 (diff)
downloadu-boot-9f9191a10785f96a5bb753f4cd6961cae56c389d.tar.xz
phy: usbphyc: use regulator_set_enable_if_allowed for disabling vdd supply
Use regulator_set_enable_if_allowed() api instead of regulator_set_enable() while disabling vdd supply. This way the driver doesn't see an error when disabling an always-on regulator. This patch is needed since the commit f93fab312615 ("Revert 'power: regulator: Return success on attempt to disable an always-on regulator'") and use the API introduced by commit cc4a224af226 ("power: regulator: Introduce regulator_set_enable_if_allowed api"). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-stm32-usbphyc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index 464b0735e8..c6d3048602 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -263,7 +263,7 @@ static int stm32_usbphyc_phy_power_off(struct phy *phy)
return 0;
if (usbphyc_phy->vdd) {
- ret = regulator_set_enable(usbphyc_phy->vdd, false);
+ ret = regulator_set_enable_if_allowed(usbphyc_phy->vdd, false);
if (ret)
return ret;
}