diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-06-25 18:59:27 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-06-27 07:09:58 -0700 |
commit | 4d2a8be9772cc2e236bb57b1c734828f1229e632 (patch) | |
tree | f40e32ce44c201bfb4c999337719f87b37daa923 /drivers/regulator | |
parent | 781ed854b9aa91ebf3180dd5c1a258969f5a556a (diff) |
regulator: tps80031: Allow to configure in OFF mode in sleep state
Allow to configure the rail into sleep-off mode even if
the external req is not supported for a regulator.
bug 979143
Change-Id: I3c1bd789410b557a2ffc3133ca15ec3753ed2004
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/110881
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/tps80031-regulator.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index 411b839f1a74..4b1df3613f56 100644 --- a/drivers/regulator/tps80031-regulator.c +++ b/drivers/regulator/tps80031-regulator.c @@ -801,11 +801,11 @@ static int tps80031_power_req_config(struct device *parent, struct tps80031_regulator *ri, struct tps80031_regulator_platform_data *tps80031_pdata) { - int ret; + int ret = 0; uint8_t reg_val; if (ri->preq_bit < 0) - return 0; + goto skip_pwr_req_config; ret = tps80031_ext_power_req_config(parent, ri->ext_ctrl_flag, ri->preq_bit, ri->state_reg, ri->trans_reg); @@ -821,6 +821,7 @@ static int tps80031_power_req_config(struct device *parent, return ret; } +skip_pwr_req_config: if (tps80031_pdata->ext_ctrl_flag & (PWR_OFF_ON_SLEEP | PWR_ON_ON_SLEEP)) { reg_val = (ri->trans_reg_cache & ~0xC); |