diff options
author | Mark Brown <broonie@linaro.org> | 2014-06-24 12:20:11 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-24 12:20:11 +0100 |
commit | 4c0c9cabcb30d9d3104d2482536a0f60376085f6 (patch) | |
tree | c68696eb512ddf1fc32d4ad9788608a31ee4df2e /drivers/regulator | |
parent | d6f83370ed978d5570b7c8c22988310cb9376202 (diff) | |
parent | 5b01bd11b78b71ea1f5fc93e6e45ce6d71f5de1b (diff) | |
download | linux-4c0c9cabcb30d9d3104d2482536a0f60376085f6.tar.bz2 |
Merge remote-tracking branch 'regulator/fix/palmas' into regulator-palmas
Conflicts:
drivers/regulator/palmas-regulator.c
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 8fa651e998da..7c8b4417d7d8 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -466,6 +466,10 @@ static int palmas_set_mode_smps(struct regulator_dev *dev, unsigned int mode) if (rail_enable) palmas_smps_write(pmic->palmas, ddata->palmas_regs_info[id].ctrl_addr, reg); + + /* Switch the enable value to ensure this is used for enable */ + pmic->desc[id].enable_val = pmic->current_reg_mode[id]; + return 0; } @@ -1216,6 +1220,14 @@ static int palmas_smps_registration(struct palmas_pmic *pmic, return ret; pmic->current_reg_mode[id] = reg & PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; + + pmic->desc[id].enable_reg = + PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, + palmas_regs_info[id].ctrl_addr); + pmic->desc[id].enable_mask = + PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; + /* set_mode overrides this value */ + pmic->desc[id].enable_val = SMPS_CTRL_MODE_ON; } pmic->desc[id].type = REGULATOR_VOLTAGE; |