summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps80031-regulator.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2012-06-25 18:59:27 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-07-12 10:12:14 +0530
commite16f3ee6774226a103a9100e45e7bf6c1a58b8fd (patch)
tree8b64e49334c35d4ab38f433c8c8a48485866f8b1 /drivers/regulator/tps80031-regulator.c
parent42a316b208e9981cee1d072d082d10f11575c5c9 (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/tps80031-regulator.c')
-rw-r--r--drivers/regulator/tps80031-regulator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c
index 61579bdab305..a2f8477fadf3 100644
--- a/drivers/regulator/tps80031-regulator.c
+++ b/drivers/regulator/tps80031-regulator.c
@@ -802,11 +802,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);
@@ -822,6 +822,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);