Skip to contentSkip to conversation

regulator: palmas: Don't update tstep register for SMPS3 and SMPS7

PATCH In review Axel Lin 2 participants 2 messages Apr 19, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH v2 1/1 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.

---
 drivers/regulator/palmas-regulator.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/regulator/palmas-regulator.c +7 -0
index f26344e..b253bd4 100644
@@ -438,6 +438,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)
Signature · 1 line
1.7.10.4