* [PATCH] regulator: wm831x-ldo: Fix max_uV for gp_ldo and aldo linear range settings
@ 2013-09-23 7:54 Axel Lin
2013-09-23 11:05 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-09-23 7:54 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, linux-kernel
Fix the linear range settings in commit 5ff26a14c3331
"regulator: wm831x-ldo: Convert to use linear ranges".
For wm831x_gp_ldo:
We have below equations for list voltage before converting to linear ranges:
sel <= 0xe:
volt = 0.9-1.6V in 50mV steps
sel <= 0x1f:
volt = 1.7-3.3V in 100mV steps
max_uV for the first linear range should be 1600000 rather than 1650000. Fix it.
For wm831x_aldo:
We have below equations for list voltage before converting to linear ranges:
sel <= 0xc:
volt = 1-1.6V in 50mV steps
sel <= 0x1f
volt = 1.7-3.5V in 100mV steps
max_uV for the first linear range should be 1600000 rather than 1650000. Fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/wm831x-ldo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 2be72fe..482ebe8 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -63,7 +63,7 @@ static irqreturn_t wm831x_ldo_uv_irq(int irq, void *data)
*/
static const struct regulator_linear_range wm831x_gp_ldo_ranges[] = {
- { .min_uV = 900000, .max_uV = 1650000, .min_sel = 0, .max_sel = 14,
+ { .min_uV = 900000, .max_uV = 1600000, .min_sel = 0, .max_sel = 14,
.uV_step = 50000 },
{ .min_uV = 1700000, .max_uV = 3300000, .min_sel = 15, .max_sel = 31,
.uV_step = 100000 },
@@ -320,7 +320,7 @@ static struct platform_driver wm831x_gp_ldo_driver = {
*/
static const struct regulator_linear_range wm831x_aldo_ranges[] = {
- { .min_uV = 1000000, .max_uV = 1650000, .min_sel = 0, .max_sel = 12,
+ { .min_uV = 1000000, .max_uV = 1600000, .min_sel = 0, .max_sel = 12,
.uV_step = 50000 },
{ .min_uV = 1700000, .max_uV = 3500000, .min_sel = 13, .max_sel = 31,
.uV_step = 100000 },
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-23 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 7:54 [PATCH] regulator: wm831x-ldo: Fix max_uV for gp_ldo and aldo linear range settings Axel Lin
2013-09-23 11:05 ` 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).