aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-24 07:40:48 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-07 07:49:18 -0400
commita1ff89ef3cd6515d378f946db5f3760089bb644e (patch)
tree705efddbf2f31e3a0d00072fb077b914acd7650e /drivers/regulator
parent4f6d45f121ba190f87c67503a73d8ff2ffa3e946 (diff)
regulator: Add WM1811 support
The WM1811 has a slightly different range on LDO2 to other WM8994 class devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/wm8994-regulator.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index 1a6a690f24db..b87bf5c841f8 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -140,6 +140,14 @@ static int wm8994_ldo2_list_voltage(struct regulator_dev *rdev,
140 return (selector * 100000) + 900000; 140 return (selector * 100000) + 900000;
141 case WM8958: 141 case WM8958:
142 return (selector * 100000) + 1000000; 142 return (selector * 100000) + 1000000;
143 case WM1811:
144 switch (selector) {
145 case 0:
146 return -EINVAL;
147 default:
148 return (selector * 100000) + 950000;
149 }
150 break;
143 default: 151 default:
144 return -EINVAL; 152 return -EINVAL;
145 } 153 }
@@ -170,6 +178,11 @@ static int wm8994_ldo2_set_voltage(struct regulator_dev *rdev,
170 case WM8958: 178 case WM8958:
171 selector = (min_uV - 1000000) / 100000; 179 selector = (min_uV - 1000000) / 100000;
172 break; 180 break;
181 case WM1811:
182 selector = (min_uV - 950000) / 100000;
183 if (selector == 0)
184 selector = 1;
185 break;
173 default: 186 default:
174 return -EINVAL; 187 return -EINVAL;
175 } 188 }