diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2011-01-28 04:22:10 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-02-21 23:50:01 -0500 |
commit | d3f9c570219c72736ae2da9071f1efbf804707f7 (patch) | |
tree | 6e123cc7dbb648b94331bc0442b418c1178bdc00 /arch/arm/mach-s5pv210 | |
parent | f5412be599602124d2bdd49947b231dd77c0bf99 (diff) |
ARM: S5PV210: Use REGULATOR_SUPPLY macro for regulator consumers
To use REGULATOR_SUPPLY macro is cleaner for initializing regulator
consumer supply.
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r-- | arch/arm/mach-s5pv210/mach-aquila.c | 52 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-goni.c | 52 |
2 files changed, 34 insertions, 70 deletions
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 557add4fc56c..e5acb36a7a51 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -296,13 +296,11 @@ static struct regulator_init_data aquila_ldo17_data = { | |||
296 | }; | 296 | }; |
297 | 297 | ||
298 | /* BUCK */ | 298 | /* BUCK */ |
299 | static struct regulator_consumer_supply buck1_consumer[] = { | 299 | static struct regulator_consumer_supply buck1_consumer = |
300 | { .supply = "vddarm", }, | 300 | REGULATOR_SUPPLY("vddarm", NULL); |
301 | }; | ||
302 | 301 | ||
303 | static struct regulator_consumer_supply buck2_consumer[] = { | 302 | static struct regulator_consumer_supply buck2_consumer = |
304 | { .supply = "vddint", }, | 303 | REGULATOR_SUPPLY("vddint", NULL); |
305 | }; | ||
306 | 304 | ||
307 | static struct regulator_init_data aquila_buck1_data = { | 305 | static struct regulator_init_data aquila_buck1_data = { |
308 | .constraints = { | 306 | .constraints = { |
@@ -313,8 +311,8 @@ static struct regulator_init_data aquila_buck1_data = { | |||
313 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | 311 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
314 | REGULATOR_CHANGE_STATUS, | 312 | REGULATOR_CHANGE_STATUS, |
315 | }, | 313 | }, |
316 | .num_consumer_supplies = ARRAY_SIZE(buck1_consumer), | 314 | .num_consumer_supplies = 1, |
317 | .consumer_supplies = buck1_consumer, | 315 | .consumer_supplies = &buck1_consumer, |
318 | }; | 316 | }; |
319 | 317 | ||
320 | static struct regulator_init_data aquila_buck2_data = { | 318 | static struct regulator_init_data aquila_buck2_data = { |
@@ -326,8 +324,8 @@ static struct regulator_init_data aquila_buck2_data = { | |||
326 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | 324 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
327 | REGULATOR_CHANGE_STATUS, | 325 | REGULATOR_CHANGE_STATUS, |
328 | }, | 326 | }, |
329 | .num_consumer_supplies = ARRAY_SIZE(buck2_consumer), | 327 | .num_consumer_supplies = 1, |
330 | .consumer_supplies = buck2_consumer, | 328 | .consumer_supplies = &buck2_consumer, |
331 | }; | 329 | }; |
332 | 330 | ||
333 | static struct regulator_init_data aquila_buck3_data = { | 331 | static struct regulator_init_data aquila_buck3_data = { |
@@ -391,26 +389,14 @@ static struct max8998_platform_data aquila_max8998_pdata = { | |||
391 | #endif | 389 | #endif |
392 | 390 | ||
393 | static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = { | 391 | static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = { |
394 | { | 392 | REGULATOR_SUPPLY("DBVDD", "5-001a"), |
395 | .dev_name = "5-001a", | 393 | REGULATOR_SUPPLY("AVDD2", "5-001a"), |
396 | .supply = "DBVDD", | 394 | REGULATOR_SUPPLY("CPVDD", "5-001a"), |
397 | }, { | ||
398 | .dev_name = "5-001a", | ||
399 | .supply = "AVDD2", | ||
400 | }, { | ||
401 | .dev_name = "5-001a", | ||
402 | .supply = "CPVDD", | ||
403 | }, | ||
404 | }; | 395 | }; |
405 | 396 | ||
406 | static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = { | 397 | static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = { |
407 | { | 398 | REGULATOR_SUPPLY("SPKVDD1", "5-001a"), |
408 | .dev_name = "5-001a", | 399 | REGULATOR_SUPPLY("SPKVDD2", "5-001a"), |
409 | .supply = "SPKVDD1", | ||
410 | }, { | ||
411 | .dev_name = "5-001a", | ||
412 | .supply = "SPKVDD2", | ||
413 | }, | ||
414 | }; | 400 | }; |
415 | 401 | ||
416 | static struct regulator_init_data wm8994_fixed_voltage0_init_data = { | 402 | static struct regulator_init_data wm8994_fixed_voltage0_init_data = { |
@@ -459,15 +445,11 @@ static struct platform_device wm8994_fixed_voltage1 = { | |||
459 | }, | 445 | }, |
460 | }; | 446 | }; |
461 | 447 | ||
462 | static struct regulator_consumer_supply wm8994_avdd1_supply = { | 448 | static struct regulator_consumer_supply wm8994_avdd1_supply = |
463 | .dev_name = "5-001a", | 449 | REGULATOR_SUPPLY("AVDD1", "5-001a"); |
464 | .supply = "AVDD1", | ||
465 | }; | ||
466 | 450 | ||
467 | static struct regulator_consumer_supply wm8994_dcvdd_supply = { | 451 | static struct regulator_consumer_supply wm8994_dcvdd_supply = |
468 | .dev_name = "5-001a", | 452 | REGULATOR_SUPPLY("DCVDD", "5-001a"); |
469 | .supply = "DCVDD", | ||
470 | }; | ||
471 | 453 | ||
472 | static struct regulator_init_data wm8994_ldo1_data = { | 454 | static struct regulator_init_data wm8994_ldo1_data = { |
473 | .constraints = { | 455 | .constraints = { |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 056f5c769b0a..43c1c1b1c0ae 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -436,13 +436,11 @@ static struct regulator_init_data goni_ldo17_data = { | |||
436 | }; | 436 | }; |
437 | 437 | ||
438 | /* BUCK */ | 438 | /* BUCK */ |
439 | static struct regulator_consumer_supply buck1_consumer[] = { | 439 | static struct regulator_consumer_supply buck1_consumer = |
440 | { .supply = "vddarm", }, | 440 | REGULATOR_SUPPLY("vddarm", NULL); |
441 | }; | ||
442 | 441 | ||
443 | static struct regulator_consumer_supply buck2_consumer[] = { | 442 | static struct regulator_consumer_supply buck2_consumer = |
444 | { .supply = "vddint", }, | 443 | REGULATOR_SUPPLY("vddint", NULL); |
445 | }; | ||
446 | 444 | ||
447 | static struct regulator_init_data goni_buck1_data = { | 445 | static struct regulator_init_data goni_buck1_data = { |
448 | .constraints = { | 446 | .constraints = { |
@@ -453,8 +451,8 @@ static struct regulator_init_data goni_buck1_data = { | |||
453 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | 451 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
454 | REGULATOR_CHANGE_STATUS, | 452 | REGULATOR_CHANGE_STATUS, |
455 | }, | 453 | }, |
456 | .num_consumer_supplies = ARRAY_SIZE(buck1_consumer), | 454 | .num_consumer_supplies = 1, |
457 | .consumer_supplies = buck1_consumer, | 455 | .consumer_supplies = &buck1_consumer, |
458 | }; | 456 | }; |
459 | 457 | ||
460 | static struct regulator_init_data goni_buck2_data = { | 458 | static struct regulator_init_data goni_buck2_data = { |
@@ -466,8 +464,8 @@ static struct regulator_init_data goni_buck2_data = { | |||
466 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | 464 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
467 | REGULATOR_CHANGE_STATUS, | 465 | REGULATOR_CHANGE_STATUS, |
468 | }, | 466 | }, |
469 | .num_consumer_supplies = ARRAY_SIZE(buck2_consumer), | 467 | .num_consumer_supplies = 1, |
470 | .consumer_supplies = buck2_consumer, | 468 | .consumer_supplies = &buck2_consumer, |
471 | }; | 469 | }; |
472 | 470 | ||
473 | static struct regulator_init_data goni_buck3_data = { | 471 | static struct regulator_init_data goni_buck3_data = { |
@@ -531,26 +529,14 @@ static struct max8998_platform_data goni_max8998_pdata = { | |||
531 | #endif | 529 | #endif |
532 | 530 | ||
533 | static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = { | 531 | static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = { |
534 | { | 532 | REGULATOR_SUPPLY("DBVDD", "5-001a"), |
535 | .dev_name = "5-001a", | 533 | REGULATOR_SUPPLY("AVDD2", "5-001a"), |
536 | .supply = "DBVDD", | 534 | REGULATOR_SUPPLY("CPVDD", "5-001a"), |
537 | }, { | ||
538 | .dev_name = "5-001a", | ||
539 | .supply = "AVDD2", | ||
540 | }, { | ||
541 | .dev_name = "5-001a", | ||
542 | .supply = "CPVDD", | ||
543 | }, | ||
544 | }; | 535 | }; |
545 | 536 | ||
546 | static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = { | 537 | static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = { |
547 | { | 538 | REGULATOR_SUPPLY("SPKVDD1", "5-001a"), |
548 | .dev_name = "5-001a", | 539 | REGULATOR_SUPPLY("SPKVDD2", "5-001a"), |
549 | .supply = "SPKVDD1", | ||
550 | }, { | ||
551 | .dev_name = "5-001a", | ||
552 | .supply = "SPKVDD2", | ||
553 | }, | ||
554 | }; | 540 | }; |
555 | 541 | ||
556 | static struct regulator_init_data wm8994_fixed_voltage0_init_data = { | 542 | static struct regulator_init_data wm8994_fixed_voltage0_init_data = { |
@@ -599,15 +585,11 @@ static struct platform_device wm8994_fixed_voltage1 = { | |||
599 | }, | 585 | }, |
600 | }; | 586 | }; |
601 | 587 | ||
602 | static struct regulator_consumer_supply wm8994_avdd1_supply = { | 588 | static struct regulator_consumer_supply wm8994_avdd1_supply = |
603 | .dev_name = "5-001a", | 589 | REGULATOR_SUPPLY("AVDD1", "5-001a"); |
604 | .supply = "AVDD1", | ||
605 | }; | ||
606 | 590 | ||
607 | static struct regulator_consumer_supply wm8994_dcvdd_supply = { | 591 | static struct regulator_consumer_supply wm8994_dcvdd_supply = |
608 | .dev_name = "5-001a", | 592 | REGULATOR_SUPPLY("DCVDD", "5-001a"); |
609 | .supply = "DCVDD", | ||
610 | }; | ||
611 | 593 | ||
612 | static struct regulator_init_data wm8994_ldo1_data = { | 594 | static struct regulator_init_data wm8994_ldo1_data = { |
613 | .constraints = { | 595 | .constraints = { |