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 commitf93fab3126
("Revert 'power: regulator: Return success on attempt to disable an always-on regulator'") and use the API introduced by commitcc4a224af2
("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>
This commit is contained in:
parent
ded48bec05
commit
9f9191a107
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user