diff options
Diffstat (limited to 'drivers/regulator/ti-abb-regulator.c')
| -rw-r--r-- | drivers/regulator/ti-abb-regulator.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c index d8e3e1262bc2..20c271d49dcb 100644 --- a/drivers/regulator/ti-abb-regulator.c +++ b/drivers/regulator/ti-abb-regulator.c | |||
| @@ -279,8 +279,12 @@ static int ti_abb_set_opp(struct regulator_dev *rdev, struct ti_abb *abb, | |||
| 279 | ti_abb_rmw(regs->opp_sel_mask, info->opp_sel, regs->control_reg, | 279 | ti_abb_rmw(regs->opp_sel_mask, info->opp_sel, regs->control_reg, |
| 280 | abb->base); | 280 | abb->base); |
| 281 | 281 | ||
| 282 | /* program LDO VBB vset override if needed */ | 282 | /* |
| 283 | if (abb->ldo_base) | 283 | * program LDO VBB vset override if needed for !bypass mode |
| 284 | * XXX: Do not switch sequence - for !bypass, LDO override reset *must* | ||
| 285 | * be performed *before* switch to bias mode else VBB glitches. | ||
| 286 | */ | ||
| 287 | if (abb->ldo_base && info->opp_sel != TI_ABB_NOMINAL_OPP) | ||
| 284 | ti_abb_program_ldovbb(dev, abb, info); | 288 | ti_abb_program_ldovbb(dev, abb, info); |
| 285 | 289 | ||
| 286 | /* Initiate ABB ldo change */ | 290 | /* Initiate ABB ldo change */ |
| @@ -295,6 +299,14 @@ static int ti_abb_set_opp(struct regulator_dev *rdev, struct ti_abb *abb, | |||
| 295 | if (ret) | 299 | if (ret) |
| 296 | goto out; | 300 | goto out; |
| 297 | 301 | ||
| 302 | /* | ||
| 303 | * Reset LDO VBB vset override bypass mode | ||
| 304 | * XXX: Do not switch sequence - for bypass, LDO override reset *must* | ||
| 305 | * be performed *after* switch to bypass else VBB glitches. | ||
| 306 | */ | ||
| 307 | if (abb->ldo_base && info->opp_sel == TI_ABB_NOMINAL_OPP) | ||
| 308 | ti_abb_program_ldovbb(dev, abb, info); | ||
| 309 | |||
| 298 | out: | 310 | out: |
| 299 | return ret; | 311 | return ret; |
| 300 | } | 312 | } |
