* [PATCH RFT] regulator: s2mps11: Fix ramp_delay settings for s2mps11_buck_ops
@ 2012-07-17 6:47 Axel Lin
2012-08-01 19:58 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-07-17 6:47 UTC (permalink / raw)
To: Mark Brown; +Cc: Sangbeom Kim, Liam Girdwood, linux-kernel
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.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/s2mps11.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 4669dc9..b0f7ac1 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -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 = ®ulators[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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RFT] regulator: s2mps11: Fix ramp_delay settings for s2mps11_buck_ops
2012-07-17 6:47 [PATCH RFT] regulator: s2mps11: Fix ramp_delay settings for s2mps11_buck_ops Axel Lin
@ 2012-08-01 19:58 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-08-01 19:58 UTC (permalink / raw)
To: Axel Lin; +Cc: Sangbeom Kim, Liam Girdwood, linux-kernel
On Tue, Jul 17, 2012 at 02:47:21PM +0800, Axel Lin wrote:
> The ramp_delay settings were missing while converting to
> regulator_set_voltage_time_sel(). Fix it.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-01 19:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-17 6:47 [PATCH RFT] regulator: s2mps11: Fix ramp_delay settings for s2mps11_buck_ops Axel Lin
2012-08-01 19:58 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).