aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/s5m8767.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-10 02:08:19 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 04:53:49 -0400
commit65896e7362670aa9a416d851ec11b7fc009c7e94 (patch)
tree107b48ac1d2f6a8d01f00d13aba0b30d592f9480 /drivers/regulator/s5m8767.c
parentd35aad0cad46b9779085925cdbbea4a5f55e3c05 (diff)
regulator: Replace regulator_desc_[ldo|buck] by s5m8767_regulator_desc macro
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/s5m8767.c')
-rw-r--r--drivers/regulator/s5m8767.c89
1 files changed, 41 insertions, 48 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 14b06c8d378f..cb53187a60d3 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -465,59 +465,52 @@ static struct regulator_ops s5m8767_ops = {
465 .set_voltage_time_sel = s5m8767_set_voltage_time_sel, 465 .set_voltage_time_sel = s5m8767_set_voltage_time_sel,
466}; 466};
467 467
468#define regulator_desc_ldo(num) { \ 468#define s5m8767_regulator_desc(_name) { \
469 .name = "LDO"#num, \ 469 .name = #_name, \
470 .id = S5M8767_LDO##num, \ 470 .id = S5M8767_##_name, \
471 .ops = &s5m8767_ops, \ 471 .ops = &s5m8767_ops, \
472 .type = REGULATOR_VOLTAGE, \
473 .owner = THIS_MODULE, \
474}
475#define regulator_desc_buck(num) { \
476 .name = "BUCK"#num, \
477 .id = S5M8767_BUCK##num, \
478 .ops = &s5m8767_ops, \
479 .type = REGULATOR_VOLTAGE, \ 472 .type = REGULATOR_VOLTAGE, \
480 .owner = THIS_MODULE, \ 473 .owner = THIS_MODULE, \
481} 474}
482 475
483static struct regulator_desc regulators[] = { 476static struct regulator_desc regulators[] = {
484 regulator_desc_ldo(1), 477 s5m8767_regulator_desc(LDO1),
485 regulator_desc_ldo(2), 478 s5m8767_regulator_desc(LDO2),
486 regulator_desc_ldo(3), 479 s5m8767_regulator_desc(LDO3),
487 regulator_desc_ldo(4), 480 s5m8767_regulator_desc(LDO4),
488 regulator_desc_ldo(5), 481 s5m8767_regulator_desc(LDO5),
489 regulator_desc_ldo(6), 482 s5m8767_regulator_desc(LDO6),
490 regulator_desc_ldo(7), 483 s5m8767_regulator_desc(LDO7),
491 regulator_desc_ldo(8), 484 s5m8767_regulator_desc(LDO8),
492 regulator_desc_ldo(9), 485 s5m8767_regulator_desc(LDO9),
493 regulator_desc_ldo(10), 486 s5m8767_regulator_desc(LDO10),
494 regulator_desc_ldo(11), 487 s5m8767_regulator_desc(LDO11),
495 regulator_desc_ldo(12), 488 s5m8767_regulator_desc(LDO12),
496 regulator_desc_ldo(13), 489 s5m8767_regulator_desc(LDO13),
497 regulator_desc_ldo(14), 490 s5m8767_regulator_desc(LDO14),
498 regulator_desc_ldo(15), 491 s5m8767_regulator_desc(LDO15),
499 regulator_desc_ldo(16), 492 s5m8767_regulator_desc(LDO16),
500 regulator_desc_ldo(17), 493 s5m8767_regulator_desc(LDO17),
501 regulator_desc_ldo(18), 494 s5m8767_regulator_desc(LDO18),
502 regulator_desc_ldo(19), 495 s5m8767_regulator_desc(LDO19),
503 regulator_desc_ldo(20), 496 s5m8767_regulator_desc(LDO20),
504 regulator_desc_ldo(21), 497 s5m8767_regulator_desc(LDO21),
505 regulator_desc_ldo(22), 498 s5m8767_regulator_desc(LDO22),
506 regulator_desc_ldo(23), 499 s5m8767_regulator_desc(LDO23),
507 regulator_desc_ldo(24), 500 s5m8767_regulator_desc(LDO24),
508 regulator_desc_ldo(25), 501 s5m8767_regulator_desc(LDO25),
509 regulator_desc_ldo(26), 502 s5m8767_regulator_desc(LDO26),
510 regulator_desc_ldo(27), 503 s5m8767_regulator_desc(LDO27),
511 regulator_desc_ldo(28), 504 s5m8767_regulator_desc(LDO28),
512 regulator_desc_buck(1), 505 s5m8767_regulator_desc(BUCK1),
513 regulator_desc_buck(2), 506 s5m8767_regulator_desc(BUCK2),
514 regulator_desc_buck(3), 507 s5m8767_regulator_desc(BUCK3),
515 regulator_desc_buck(4), 508 s5m8767_regulator_desc(BUCK4),
516 regulator_desc_buck(5), 509 s5m8767_regulator_desc(BUCK5),
517 regulator_desc_buck(6), 510 s5m8767_regulator_desc(BUCK6),
518 regulator_desc_buck(7), 511 s5m8767_regulator_desc(BUCK7),
519 regulator_desc_buck(8), 512 s5m8767_regulator_desc(BUCK8),
520 regulator_desc_buck(9), 513 s5m8767_regulator_desc(BUCK9),
521}; 514};
522 515
523static __devinit int s5m8767_pmic_probe(struct platform_device *pdev) 516static __devinit int s5m8767_pmic_probe(struct platform_device *pdev)