Skip to contentSkip to conversation

regulator: s2mps11: Fix ramp_delay settings for s2mps11_buck_ops

PATCH Applied Axel Lin 2 participants 2 messages Jul 17, 2012 – Aug 1, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: s2mps11: Fix ramp_delay settings for s2mps11_buck_ops

The ramp_delay settings were missing while converting to regulator_set_voltage_time_sel(). Fix it.

There is no ramp_delay setting for s2mps11_ldo_ops, thus remove setting set_voltage_sel callback for s2mps11_ldo_ops.

---
 drivers/regulator/s2mps11.c |   27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)
drivers/regulator/s2mps11.c +26 -1
index 4669dc9..b0f7ac1 100644
@@ -62,7 +62,6 @@ static struct regulator_ops s2mps11_ldo_ops = {
 	.disable		= regulator_disable_regmap,
 	.get_voltage_sel	= regulator_get_voltage_sel_regmap,
 	.set_voltage_sel	= regulator_set_voltage_sel_regmap,
-	.set_voltage_time_sel	= regulator_set_voltage_time_sel,
 };
 
 static struct regulator_ops s2mps11_buck_ops = {
@@ -291,6 +290,32 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
 	sec_reg_write(iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg);
 
 	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
+		struct regulator_desc *desc = &regulators[i];
+
+		switch (i) {
+		case S2MPS11_BUCK1:
+		case S2MPS11_BUCK6:
+			desc->ramp_delay = pdata->buck16_ramp_delay * 1000;
+			break;
+		case S2MPS11_BUCK2:
+			desc->ramp_delay = pdata->buck2_ramp_delay * 1000;
+			break;
+		case S2MPS11_BUCK3:
+		case S2MPS11_BUCK4:
+			desc->ramp_delay = pdata->buck34_ramp_delay * 1000;
+			break;
+		case S2MPS11_BUCK5:
+			desc->ramp_delay = pdata->buck5_ramp_delay * 1000;
+			break;
+		case S2MPS11_BUCK7:
+		case S2MPS11_BUCK8:
+		case S2MPS11_BUCK10:
+			desc->ramp_delay = pdata->buck7810_ramp_delay * 1000;
+			break;
+		case S2MPS11_BUCK9:
+			desc->ramp_delay = pdata->buck9_ramp_delay * 1000;
+			break;
+		}
 
 		config.dev = &pdev->dev;
 		config.regmap = iodev->regmap;
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 2 lines · Axel Lin

The ramp_delay settings were missing while converting to regulator_set_voltage_time_sel(). Fix it.

Applied, thanks.