mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
power: regulator: Return success on attempt to disable an always-on regulator
commit4f86a724e8
("power: regulator: denied disable on always-on regulator") throws an error when requested to disable an always-on regulator. It is right that an always-on regulator should not be attempted to be disabled. But at the same time regulator framework should not return an error when such request is received. Instead it should just return success without attempting to disable the specified regulator. This is because the requesting driver will not have the idea if the regulator is always-on or not. The requesting driver will always try to enable/disable regulator as per the required flow. So it is upto regulator framework to not break such scenarios. Fixes:4f86a724e8
("power: regulator: denied disable on always-on regulator") Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
This commit is contained in:
parent
ca80b561e1
commit
e17e0ceb83
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ int regulator_set_enable(struct udevice *dev, bool enable)
|
|||
|
||||
uc_pdata = dev_get_uclass_platdata(dev);
|
||||
if (!enable && uc_pdata->always_on)
|
||||
return -EACCES;
|
||||
return 0;
|
||||
|
||||
return ops->set_enable(dev, enable);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue