aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max8973-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-04-23 12:14:55 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-24 05:52:28 -0400
commitb27032ca3ec19edc7a1e3ed76e0988645505507b (patch)
tree359b4fe893d15b9078ed8be1460afbd992e88bb4 /drivers/regulator/max8973-regulator.c
parent60d509fa6a9c4653a86ad830e4c4b30360b23f0e (diff)
regulator: max8973: Don't override control1 variable when set ramp delay bits
Current code overrides control1 variable when setting ramp delay bits. Fix it by just setting ramp_delay bits. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/max8973-regulator.c')
-rw-r--r--drivers/regulator/max8973-regulator.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index 9a8ea9163005..adb1414e5e37 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -274,15 +274,15 @@ static int max8973_init_dcdc(struct max8973_chip *max,
274 if (pdata->reg_init_data && 274 if (pdata->reg_init_data &&
275 pdata->reg_init_data->constraints.ramp_delay) { 275 pdata->reg_init_data->constraints.ramp_delay) {
276 if (pdata->reg_init_data->constraints.ramp_delay < 25000) 276 if (pdata->reg_init_data->constraints.ramp_delay < 25000)
277 control1 = MAX8973_RAMP_12mV_PER_US; 277 control1 |= MAX8973_RAMP_12mV_PER_US;
278 else if (pdata->reg_init_data->constraints.ramp_delay < 50000) 278 else if (pdata->reg_init_data->constraints.ramp_delay < 50000)
279 control1 = MAX8973_RAMP_25mV_PER_US; 279 control1 |= MAX8973_RAMP_25mV_PER_US;
280 else if (pdata->reg_init_data->constraints.ramp_delay < 200000) 280 else if (pdata->reg_init_data->constraints.ramp_delay < 200000)
281 control1 = MAX8973_RAMP_50mV_PER_US; 281 control1 |= MAX8973_RAMP_50mV_PER_US;
282 else 282 else
283 control1 = MAX8973_RAMP_200mV_PER_US; 283 control1 |= MAX8973_RAMP_200mV_PER_US;
284 } else { 284 } else {
285 control1 = MAX8973_RAMP_12mV_PER_US; 285 control1 |= MAX8973_RAMP_12mV_PER_US;
286 max->desc.ramp_delay = 12500; 286 max->desc.ramp_delay = 12500;
287 } 287 }
288 288