diff options
author | Lokesh Vutla | 2019-01-11 15:15:50 +0530 |
---|---|---|
committer | Simon Glass | 2019-02-09 12:50:22 -0700 |
commit | f93fab312615ce0bc9aac33f9dcd876a3fed1290 (patch) | |
tree | 5f09ee3aedec8a6deacd9f515982b9c1a7b3b003 /drivers/power | |
parent | 91b3a1866b82329dd0d5333aa59141fccb1f2c17 (diff) |
Revert "power: regulator: Return success on attempt to disable an always-on regulator"
This reverts commit e17e0ceb83538c015a50b965547f2f4d38f81c5d.
It is advised to return an error when trying to disable an always-on
regulator and let the consumer driver handle the error if needed.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/regulator/regulator-uclass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 39e46279d53..4511625ff25 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -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 0; + return -EACCES; return ops->set_enable(dev, enable); } |