aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorYong Shen <yong.shen@linaro.org>2010-12-14 01:00:53 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-01-12 09:33:03 -0500
commit57c78e359a35c69eca4c88f107500f74ef7f0acf (patch)
tree1b58bce66db5c9c7a7c9dc2de153f18a53af0dcf /drivers/regulator
parenta1e516e3a5552519a01e8a7636569d2d1b68431f (diff)
Change the register name definitions for mc13783
To make mc13783 and mc13892 share code, the register names should be changed to fit the new macro definitions in the comming patch. Signed-off-by: Yong Shen <yong.shen@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/mc13783-regulator.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index e99917a63ed4..6a6e1d63d86f 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -228,15 +228,15 @@ static struct regulator_ops mc13783_gpo_regulator_ops;
228 } 228 }
229 229
230#define MC13783_DEFINE_SW(_name, _reg, _vsel_reg, _voltages) \ 230#define MC13783_DEFINE_SW(_name, _reg, _vsel_reg, _voltages) \
231 MC13783_DEFINE(SW, _name, _reg, _vsel_reg, _voltages) 231 MC13783_DEFINE(REG, _name, _reg, _vsel_reg, _voltages)
232#define MC13783_DEFINE_REGU(_name, _reg, _vsel_reg, _voltages) \ 232#define MC13783_DEFINE_REGU(_name, _reg, _vsel_reg, _voltages) \
233 MC13783_DEFINE(REGU, _name, _reg, _vsel_reg, _voltages) 233 MC13783_DEFINE(REG, _name, _reg, _vsel_reg, _voltages)
234 234
235static struct mc13783_regulator mc13783_regulators[] = { 235static struct mc13783_regulator mc13783_regulators[] = {
236 MC13783_DEFINE_SW(SW3, SWITCHERS5, SWITCHERS5, mc13783_sw3_val), 236 MC13783_DEFINE_SW(SW3, SWITCHERS5, SWITCHERS5, mc13783_sw3_val),
237 237
238 MC13783_FIXED_DEFINE(REGU, VAUDIO, REGULATORMODE0, mc13783_vaudio_val), 238 MC13783_FIXED_DEFINE(REG, VAUDIO, REGULATORMODE0, mc13783_vaudio_val),
239 MC13783_FIXED_DEFINE(REGU, VIOHI, REGULATORMODE0, mc13783_viohi_val), 239 MC13783_FIXED_DEFINE(REG, VIOHI, REGULATORMODE0, mc13783_viohi_val),
240 MC13783_DEFINE_REGU(VIOLO, REGULATORMODE0, REGULATORSETTING0, \ 240 MC13783_DEFINE_REGU(VIOLO, REGULATORMODE0, REGULATORSETTING0, \
241 mc13783_violo_val), 241 mc13783_violo_val),
242 MC13783_DEFINE_REGU(VDIG, REGULATORMODE0, REGULATORSETTING0, \ 242 MC13783_DEFINE_REGU(VDIG, REGULATORMODE0, REGULATORSETTING0, \
@@ -255,7 +255,7 @@ static struct mc13783_regulator mc13783_regulators[] = {
255 mc13783_vesim_val), 255 mc13783_vesim_val),
256 MC13783_DEFINE_REGU(VCAM, REGULATORMODE1, REGULATORSETTING0, \ 256 MC13783_DEFINE_REGU(VCAM, REGULATORMODE1, REGULATORSETTING0, \
257 mc13783_vcam_val), 257 mc13783_vcam_val),
258 MC13783_FIXED_DEFINE(REGU, VRFBG, REGULATORMODE1, mc13783_vrfbg_val), 258 MC13783_FIXED_DEFINE(REG, VRFBG, REGULATORMODE1, mc13783_vrfbg_val),
259 MC13783_DEFINE_REGU(VVIB, REGULATORMODE1, REGULATORSETTING1, \ 259 MC13783_DEFINE_REGU(VVIB, REGULATORMODE1, REGULATORSETTING1, \
260 mc13783_vvib_val), 260 mc13783_vvib_val),
261 MC13783_DEFINE_REGU(VRF1, REGULATORMODE1, REGULATORSETTING1, \ 261 MC13783_DEFINE_REGU(VRF1, REGULATORMODE1, REGULATORSETTING1, \
@@ -266,12 +266,12 @@ static struct mc13783_regulator mc13783_regulators[] = {
266 mc13783_vmmc_val), 266 mc13783_vmmc_val),
267 MC13783_DEFINE_REGU(VMMC2, REGULATORMODE1, REGULATORSETTING1, \ 267 MC13783_DEFINE_REGU(VMMC2, REGULATORMODE1, REGULATORSETTING1, \
268 mc13783_vmmc_val), 268 mc13783_vmmc_val),
269 MC13783_GPO_DEFINE(REGU, GPO1, POWERMISC, mc13783_gpo_val), 269 MC13783_GPO_DEFINE(REG, GPO1, POWERMISC, mc13783_gpo_val),
270 MC13783_GPO_DEFINE(REGU, GPO2, POWERMISC, mc13783_gpo_val), 270 MC13783_GPO_DEFINE(REG, GPO2, POWERMISC, mc13783_gpo_val),
271 MC13783_GPO_DEFINE(REGU, GPO3, POWERMISC, mc13783_gpo_val), 271 MC13783_GPO_DEFINE(REG, GPO3, POWERMISC, mc13783_gpo_val),
272 MC13783_GPO_DEFINE(REGU, GPO4, POWERMISC, mc13783_gpo_val), 272 MC13783_GPO_DEFINE(REG, GPO4, POWERMISC, mc13783_gpo_val),
273 MC13783_GPO_DEFINE(REGU, PWGT1SPI, POWERMISC, mc13783_pwgtdrv_val), 273 MC13783_GPO_DEFINE(REG, PWGT1SPI, POWERMISC, mc13783_pwgtdrv_val),
274 MC13783_GPO_DEFINE(REGU, PWGT2SPI, POWERMISC, mc13783_pwgtdrv_val), 274 MC13783_GPO_DEFINE(REG, PWGT2SPI, POWERMISC, mc13783_pwgtdrv_val),
275}; 275};
276 276
277struct mc13783_regulator_priv { 277struct mc13783_regulator_priv {
@@ -508,8 +508,8 @@ static int mc13783_gpo_regulator_enable(struct regulator_dev *rdev)
508 dev_dbg(rdev_get_dev(rdev), "%s id: %d\n", __func__, id); 508 dev_dbg(rdev_get_dev(rdev), "%s id: %d\n", __func__, id);
509 509
510 /* Power Gate enable value is 0 */ 510 /* Power Gate enable value is 0 */
511 if (id == MC13783_REGU_PWGT1SPI || 511 if (id == MC13783_REG_PWGT1SPI ||
512 id == MC13783_REGU_PWGT2SPI) 512 id == MC13783_REG_PWGT2SPI)
513 en_val = 0; 513 en_val = 0;
514 514
515 mc13783_lock(priv->mc13783); 515 mc13783_lock(priv->mc13783);
@@ -530,8 +530,8 @@ static int mc13783_gpo_regulator_disable(struct regulator_dev *rdev)
530 dev_dbg(rdev_get_dev(rdev), "%s id: %d\n", __func__, id); 530 dev_dbg(rdev_get_dev(rdev), "%s id: %d\n", __func__, id);
531 531
532 /* Power Gate disable value is 1 */ 532 /* Power Gate disable value is 1 */
533 if (id == MC13783_REGU_PWGT1SPI || 533 if (id == MC13783_REG_PWGT1SPI ||
534 id == MC13783_REGU_PWGT2SPI) 534 id == MC13783_REG_PWGT2SPI)
535 dis_val = mc13783_regulators[id].enable_bit; 535 dis_val = mc13783_regulators[id].enable_bit;
536 536
537 mc13783_lock(priv->mc13783); 537 mc13783_lock(priv->mc13783);