Commit b27032ca authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

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: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 60d509fa
...@@ -274,15 +274,15 @@ static int max8973_init_dcdc(struct max8973_chip *max, ...@@ -274,15 +274,15 @@ static int max8973_init_dcdc(struct max8973_chip *max,
if (pdata->reg_init_data && if (pdata->reg_init_data &&
pdata->reg_init_data->constraints.ramp_delay) { pdata->reg_init_data->constraints.ramp_delay) {
if (pdata->reg_init_data->constraints.ramp_delay < 25000) if (pdata->reg_init_data->constraints.ramp_delay < 25000)
control1 = MAX8973_RAMP_12mV_PER_US; control1 |= MAX8973_RAMP_12mV_PER_US;
else if (pdata->reg_init_data->constraints.ramp_delay < 50000) else if (pdata->reg_init_data->constraints.ramp_delay < 50000)
control1 = MAX8973_RAMP_25mV_PER_US; control1 |= MAX8973_RAMP_25mV_PER_US;
else if (pdata->reg_init_data->constraints.ramp_delay < 200000) else if (pdata->reg_init_data->constraints.ramp_delay < 200000)
control1 = MAX8973_RAMP_50mV_PER_US; control1 |= MAX8973_RAMP_50mV_PER_US;
else else
control1 = MAX8973_RAMP_200mV_PER_US; control1 |= MAX8973_RAMP_200mV_PER_US;
} else { } else {
control1 = MAX8973_RAMP_12mV_PER_US; control1 |= MAX8973_RAMP_12mV_PER_US;
max->desc.ramp_delay = 12500; max->desc.ramp_delay = 12500;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment