diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-06-08 03:41:48 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-17 16:01:21 -0400 |
commit | 34e74f39fa9a2c1489444266cc9e973dc1b3a419 (patch) | |
tree | bfa49ea87b6779fb19be3673b28f8bb191e11865 /drivers/regulator/mc13892-regulator.c | |
parent | ee5e6253ac22210da892435711890fa2272daa41 (diff) |
regulator: mc13xxx: Convert to regulator_list_voltage_table
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/mc13892-regulator.c')
-rw-r--r-- | drivers/regulator/mc13892-regulator.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c index 970a233dbe46..6329723b5372 100644 --- a/drivers/regulator/mc13892-regulator.c +++ b/drivers/regulator/mc13892-regulator.c | |||
@@ -150,12 +150,12 @@ | |||
150 | #define MC13892_USB1 50 | 150 | #define MC13892_USB1 50 |
151 | #define MC13892_USB1_VUSBEN (1<<3) | 151 | #define MC13892_USB1_VUSBEN (1<<3) |
152 | 152 | ||
153 | static const int mc13892_vcoincell[] = { | 153 | static const unsigned int mc13892_vcoincell[] = { |
154 | 2500000, 2700000, 2800000, 2900000, 3000000, 3100000, | 154 | 2500000, 2700000, 2800000, 2900000, 3000000, 3100000, |
155 | 3200000, 3300000, | 155 | 3200000, 3300000, |
156 | }; | 156 | }; |
157 | 157 | ||
158 | static const int mc13892_sw1[] = { | 158 | static const unsigned int mc13892_sw1[] = { |
159 | 600000, 625000, 650000, 675000, 700000, 725000, | 159 | 600000, 625000, 650000, 675000, 700000, 725000, |
160 | 750000, 775000, 800000, 825000, 850000, 875000, | 160 | 750000, 775000, 800000, 825000, 850000, 875000, |
161 | 900000, 925000, 950000, 975000, 1000000, 1025000, | 161 | 900000, 925000, 950000, 975000, 1000000, 1025000, |
@@ -164,7 +164,7 @@ static const int mc13892_sw1[] = { | |||
164 | 1350000, 1375000 | 164 | 1350000, 1375000 |
165 | }; | 165 | }; |
166 | 166 | ||
167 | static const int mc13892_sw[] = { | 167 | static const unsigned int mc13892_sw[] = { |
168 | 600000, 625000, 650000, 675000, 700000, 725000, | 168 | 600000, 625000, 650000, 675000, 700000, 725000, |
169 | 750000, 775000, 800000, 825000, 850000, 875000, | 169 | 750000, 775000, 800000, 825000, 850000, 875000, |
170 | 900000, 925000, 950000, 975000, 1000000, 1025000, | 170 | 900000, 925000, 950000, 975000, 1000000, 1025000, |
@@ -176,65 +176,65 @@ static const int mc13892_sw[] = { | |||
176 | 1800000, 1825000, 1850000, 1875000 | 176 | 1800000, 1825000, 1850000, 1875000 |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static const int mc13892_swbst[] = { | 179 | static const unsigned int mc13892_swbst[] = { |
180 | 5000000, | 180 | 5000000, |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static const int mc13892_viohi[] = { | 183 | static const unsigned int mc13892_viohi[] = { |
184 | 2775000, | 184 | 2775000, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static const int mc13892_vpll[] = { | 187 | static const unsigned int mc13892_vpll[] = { |
188 | 1050000, 1250000, 1650000, 1800000, | 188 | 1050000, 1250000, 1650000, 1800000, |
189 | }; | 189 | }; |
190 | 190 | ||
191 | static const int mc13892_vdig[] = { | 191 | static const unsigned int mc13892_vdig[] = { |
192 | 1050000, 1250000, 1650000, 1800000, | 192 | 1050000, 1250000, 1650000, 1800000, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | static const int mc13892_vsd[] = { | 195 | static const unsigned int mc13892_vsd[] = { |
196 | 1800000, 2000000, 2600000, 2700000, | 196 | 1800000, 2000000, 2600000, 2700000, |
197 | 2800000, 2900000, 3000000, 3150000, | 197 | 2800000, 2900000, 3000000, 3150000, |
198 | }; | 198 | }; |
199 | 199 | ||
200 | static const int mc13892_vusb2[] = { | 200 | static const unsigned int mc13892_vusb2[] = { |
201 | 2400000, 2600000, 2700000, 2775000, | 201 | 2400000, 2600000, 2700000, 2775000, |
202 | }; | 202 | }; |
203 | 203 | ||
204 | static const int mc13892_vvideo[] = { | 204 | static const unsigned int mc13892_vvideo[] = { |
205 | 2700000, 2775000, 2500000, 2600000, | 205 | 2700000, 2775000, 2500000, 2600000, |
206 | }; | 206 | }; |
207 | 207 | ||
208 | static const int mc13892_vaudio[] = { | 208 | static const unsigned int mc13892_vaudio[] = { |
209 | 2300000, 2500000, 2775000, 3000000, | 209 | 2300000, 2500000, 2775000, 3000000, |
210 | }; | 210 | }; |
211 | 211 | ||
212 | static const int mc13892_vcam[] = { | 212 | static const unsigned int mc13892_vcam[] = { |
213 | 2500000, 2600000, 2750000, 3000000, | 213 | 2500000, 2600000, 2750000, 3000000, |
214 | }; | 214 | }; |
215 | 215 | ||
216 | static const int mc13892_vgen1[] = { | 216 | static const unsigned int mc13892_vgen1[] = { |
217 | 1200000, 1500000, 2775000, 3150000, | 217 | 1200000, 1500000, 2775000, 3150000, |
218 | }; | 218 | }; |
219 | 219 | ||
220 | static const int mc13892_vgen2[] = { | 220 | static const unsigned int mc13892_vgen2[] = { |
221 | 1200000, 1500000, 1600000, 1800000, | 221 | 1200000, 1500000, 1600000, 1800000, |
222 | 2700000, 2800000, 3000000, 3150000, | 222 | 2700000, 2800000, 3000000, 3150000, |
223 | }; | 223 | }; |
224 | 224 | ||
225 | static const int mc13892_vgen3[] = { | 225 | static const unsigned int mc13892_vgen3[] = { |
226 | 1800000, 2900000, | 226 | 1800000, 2900000, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static const int mc13892_vusb[] = { | 229 | static const unsigned int mc13892_vusb[] = { |
230 | 3300000, | 230 | 3300000, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static const int mc13892_gpo[] = { | 233 | static const unsigned int mc13892_gpo[] = { |
234 | 2750000, | 234 | 2750000, |
235 | }; | 235 | }; |
236 | 236 | ||
237 | static const int mc13892_pwgtdrv[] = { | 237 | static const unsigned int mc13892_pwgtdrv[] = { |
238 | 5000000, | 238 | 5000000, |
239 | }; | 239 | }; |
240 | 240 | ||
@@ -394,7 +394,7 @@ static struct regulator_ops mc13892_gpo_regulator_ops = { | |||
394 | .enable = mc13892_gpo_regulator_enable, | 394 | .enable = mc13892_gpo_regulator_enable, |
395 | .disable = mc13892_gpo_regulator_disable, | 395 | .disable = mc13892_gpo_regulator_disable, |
396 | .is_enabled = mc13892_gpo_regulator_is_enabled, | 396 | .is_enabled = mc13892_gpo_regulator_is_enabled, |
397 | .list_voltage = mc13xxx_regulator_list_voltage, | 397 | .list_voltage = regulator_list_voltage_table, |
398 | .set_voltage = mc13xxx_fixed_regulator_set_voltage, | 398 | .set_voltage = mc13xxx_fixed_regulator_set_voltage, |
399 | .get_voltage = mc13xxx_fixed_regulator_get_voltage, | 399 | .get_voltage = mc13xxx_fixed_regulator_get_voltage, |
400 | }; | 400 | }; |
@@ -436,7 +436,7 @@ static int mc13892_sw_regulator_set_voltage_sel(struct regulator_dev *rdev, | |||
436 | u32 valread; | 436 | u32 valread; |
437 | int ret; | 437 | int ret; |
438 | 438 | ||
439 | value = mc13892_regulators[id].voltages[selector]; | 439 | value = rdev->desc->volt_table[selector]; |
440 | 440 | ||
441 | mc13xxx_lock(priv->mc13xxx); | 441 | mc13xxx_lock(priv->mc13xxx); |
442 | ret = mc13xxx_reg_read(priv->mc13xxx, | 442 | ret = mc13xxx_reg_read(priv->mc13xxx, |
@@ -470,7 +470,7 @@ err: | |||
470 | 470 | ||
471 | static struct regulator_ops mc13892_sw_regulator_ops = { | 471 | static struct regulator_ops mc13892_sw_regulator_ops = { |
472 | .is_enabled = mc13xxx_sw_regulator_is_enabled, | 472 | .is_enabled = mc13xxx_sw_regulator_is_enabled, |
473 | .list_voltage = mc13xxx_regulator_list_voltage, | 473 | .list_voltage = regulator_list_voltage_table, |
474 | .set_voltage_sel = mc13892_sw_regulator_set_voltage_sel, | 474 | .set_voltage_sel = mc13892_sw_regulator_set_voltage_sel, |
475 | .get_voltage = mc13892_sw_regulator_get_voltage, | 475 | .get_voltage = mc13892_sw_regulator_get_voltage, |
476 | }; | 476 | }; |