diff options
-rw-r--r-- | drivers/mfd/twl-core.c | 51 | ||||
-rw-r--r-- | include/linux/i2c/twl.h | 16 |
2 files changed, 60 insertions, 7 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index c48a6138c575..2a7606534196 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c | |||
@@ -639,7 +639,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
639 | return PTR_ERR(child); | 639 | return PTR_ERR(child); |
640 | } | 640 | } |
641 | 641 | ||
642 | if (twl_has_usb() && pdata->usb) { | 642 | if (twl_has_usb() && pdata->usb && twl_class_is_4030()) { |
643 | 643 | ||
644 | static struct regulator_consumer_supply usb1v5 = { | 644 | static struct regulator_consumer_supply usb1v5 = { |
645 | .supply = "usb1v5", | 645 | .supply = "usb1v5", |
@@ -719,7 +719,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
719 | return PTR_ERR(child); | 719 | return PTR_ERR(child); |
720 | } | 720 | } |
721 | 721 | ||
722 | if (twl_has_regulator()) { | 722 | /* twl4030 regulators */ |
723 | if (twl_has_regulator() && twl_class_is_4030()) { | ||
723 | child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); | 724 | child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); |
724 | if (IS_ERR(child)) | 725 | if (IS_ERR(child)) |
725 | return PTR_ERR(child); | 726 | return PTR_ERR(child); |
@@ -765,7 +766,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
765 | } | 766 | } |
766 | 767 | ||
767 | /* maybe add LDOs that are omitted on cost-reduced parts */ | 768 | /* maybe add LDOs that are omitted on cost-reduced parts */ |
768 | if (twl_has_regulator() && !(features & TPS_SUBSET)) { | 769 | if (twl_has_regulator() && !(features & TPS_SUBSET) |
770 | && twl_class_is_4030()) { | ||
769 | child = add_regulator(TWL4030_REG_VPLL2, pdata->vpll2); | 771 | child = add_regulator(TWL4030_REG_VPLL2, pdata->vpll2); |
770 | if (IS_ERR(child)) | 772 | if (IS_ERR(child)) |
771 | return PTR_ERR(child); | 773 | return PTR_ERR(child); |
@@ -791,6 +793,49 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
791 | return PTR_ERR(child); | 793 | return PTR_ERR(child); |
792 | } | 794 | } |
793 | 795 | ||
796 | /* twl6030 regulators */ | ||
797 | if (twl_has_regulator() && twl_class_is_6030()) { | ||
798 | child = add_regulator(TWL6030_REG_VMMC, pdata->vmmc); | ||
799 | if (IS_ERR(child)) | ||
800 | return PTR_ERR(child); | ||
801 | |||
802 | child = add_regulator(TWL6030_REG_VPP, pdata->vpp); | ||
803 | if (IS_ERR(child)) | ||
804 | return PTR_ERR(child); | ||
805 | |||
806 | child = add_regulator(TWL6030_REG_VUSIM, pdata->vusim); | ||
807 | if (IS_ERR(child)) | ||
808 | return PTR_ERR(child); | ||
809 | |||
810 | child = add_regulator(TWL6030_REG_VANA, pdata->vana); | ||
811 | if (IS_ERR(child)) | ||
812 | return PTR_ERR(child); | ||
813 | |||
814 | child = add_regulator(TWL6030_REG_VCXIO, pdata->vcxio); | ||
815 | if (IS_ERR(child)) | ||
816 | return PTR_ERR(child); | ||
817 | |||
818 | child = add_regulator(TWL6030_REG_VDAC, pdata->vdac); | ||
819 | if (IS_ERR(child)) | ||
820 | return PTR_ERR(child); | ||
821 | |||
822 | child = add_regulator(TWL6030_REG_VUSB, pdata->vusb); | ||
823 | if (IS_ERR(child)) | ||
824 | return PTR_ERR(child); | ||
825 | |||
826 | child = add_regulator(TWL6030_REG_VAUX1_6030, pdata->vaux1); | ||
827 | if (IS_ERR(child)) | ||
828 | return PTR_ERR(child); | ||
829 | |||
830 | child = add_regulator(TWL6030_REG_VAUX2_6030, pdata->vaux2); | ||
831 | if (IS_ERR(child)) | ||
832 | return PTR_ERR(child); | ||
833 | |||
834 | child = add_regulator(TWL6030_REG_VAUX3_6030, pdata->vaux3); | ||
835 | if (IS_ERR(child)) | ||
836 | return PTR_ERR(child); | ||
837 | } | ||
838 | |||
794 | return 0; | 839 | return 0; |
795 | } | 840 | } |
796 | 841 | ||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 7679e87df177..bf1c5be1f5b6 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -560,16 +560,17 @@ struct twl4030_platform_data { | |||
560 | struct twl4030_power_data *power; | 560 | struct twl4030_power_data *power; |
561 | struct twl4030_codec_data *codec; | 561 | struct twl4030_codec_data *codec; |
562 | 562 | ||
563 | /* LDO regulators */ | 563 | /* Common LDO regulators for TWL4030/TWL6030 */ |
564 | struct regulator_init_data *vdac; | 564 | struct regulator_init_data *vdac; |
565 | struct regulator_init_data *vaux1; | ||
566 | struct regulator_init_data *vaux2; | ||
567 | struct regulator_init_data *vaux3; | ||
568 | /* TWL4030 LDO regulators */ | ||
565 | struct regulator_init_data *vpll1; | 569 | struct regulator_init_data *vpll1; |
566 | struct regulator_init_data *vpll2; | 570 | struct regulator_init_data *vpll2; |
567 | struct regulator_init_data *vmmc1; | 571 | struct regulator_init_data *vmmc1; |
568 | struct regulator_init_data *vmmc2; | 572 | struct regulator_init_data *vmmc2; |
569 | struct regulator_init_data *vsim; | 573 | struct regulator_init_data *vsim; |
570 | struct regulator_init_data *vaux1; | ||
571 | struct regulator_init_data *vaux2; | ||
572 | struct regulator_init_data *vaux3; | ||
573 | struct regulator_init_data *vaux4; | 574 | struct regulator_init_data *vaux4; |
574 | struct regulator_init_data *vio; | 575 | struct regulator_init_data *vio; |
575 | struct regulator_init_data *vdd1; | 576 | struct regulator_init_data *vdd1; |
@@ -577,6 +578,13 @@ struct twl4030_platform_data { | |||
577 | struct regulator_init_data *vintana1; | 578 | struct regulator_init_data *vintana1; |
578 | struct regulator_init_data *vintana2; | 579 | struct regulator_init_data *vintana2; |
579 | struct regulator_init_data *vintdig; | 580 | struct regulator_init_data *vintdig; |
581 | /* TWL6030 LDO regulators */ | ||
582 | struct regulator_init_data *vmmc; | ||
583 | struct regulator_init_data *vpp; | ||
584 | struct regulator_init_data *vusim; | ||
585 | struct regulator_init_data *vana; | ||
586 | struct regulator_init_data *vcxio; | ||
587 | struct regulator_init_data *vusb; | ||
580 | }; | 588 | }; |
581 | 589 | ||
582 | /*----------------------------------------------------------------------*/ | 590 | /*----------------------------------------------------------------------*/ |