From: Axel Lin Date: Fri, 19 Apr 2013 06:18:48 +0000 (+0800) Subject: regulator: palmas: Don't update tstep register for SMPS3 and SMPS7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f22c2bae2e9ca75174614d7fdccc206b2b062138;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git regulator: palmas: Don't update tstep register for SMPS3 and SMPS7 SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually writes 0 to smps12_ctl (offset is 0) register when set_ramp_delay callback is called for SMPS3 and SMPS7. Signed-off-by: Axel Lin Acked-by: Laxman Dewangan Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 8e5331c0b338..a74106322604 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -437,6 +437,13 @@ static int palmas_smps_set_ramp_delay(struct regulator_dev *rdev, unsigned int addr = palmas_regs_info[id].tstep_addr; int ret; + /* SMPS3 and SMPS7 do not have tstep_addr setting */ + switch (id) { + case PALMAS_REG_SMPS3: + case PALMAS_REG_SMPS7: + return 0; + } + if (ramp_delay <= 0) reg = 0; else if (ramp_delay < 2500)