aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max77620-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/max77620-regulator.c')
-rw-r--r--drivers/regulator/max77620-regulator.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c
index 0db367b54ae7..8d9731e4052b 100644
--- a/drivers/regulator/max77620-regulator.c
+++ b/drivers/regulator/max77620-regulator.c
@@ -467,7 +467,7 @@ static int max77620_regulator_is_enabled(struct regulator_dev *rdev)
467{ 467{
468 struct max77620_regulator *pmic = rdev_get_drvdata(rdev); 468 struct max77620_regulator *pmic = rdev_get_drvdata(rdev);
469 int id = rdev_get_id(rdev); 469 int id = rdev_get_id(rdev);
470 int ret = 1; 470 int ret;
471 471
472 if (pmic->active_fps_src[id] != MAX77620_FPS_SRC_NONE) 472 if (pmic->active_fps_src[id] != MAX77620_FPS_SRC_NONE)
473 return 1; 473 return 1;
@@ -758,6 +758,24 @@ static struct max77620_regulator_info max20024_regs_info[MAX77620_NUM_REGS] = {
758 RAIL_LDO(LDO8, ldo8, "in-ldo7-8", N, 800000, 3950000, 50000), 758 RAIL_LDO(LDO8, ldo8, "in-ldo7-8", N, 800000, 3950000, 50000),
759}; 759};
760 760
761static struct max77620_regulator_info max77663_regs_info[MAX77620_NUM_REGS] = {
762 RAIL_SD(SD0, sd0, "in-sd0", SD0, 600000, 3387500, 12500, 0xFF, NONE),
763 RAIL_SD(SD1, sd1, "in-sd1", SD1, 800000, 1587500, 12500, 0xFF, NONE),
764 RAIL_SD(SD2, sd2, "in-sd2", SDX, 600000, 3787500, 12500, 0xFF, NONE),
765 RAIL_SD(SD3, sd3, "in-sd3", SDX, 600000, 3787500, 12500, 0xFF, NONE),
766 RAIL_SD(SD4, sd4, "in-sd4", SDX, 600000, 3787500, 12500, 0xFF, NONE),
767
768 RAIL_LDO(LDO0, ldo0, "in-ldo0-1", N, 800000, 2375000, 25000),
769 RAIL_LDO(LDO1, ldo1, "in-ldo0-1", N, 800000, 2375000, 25000),
770 RAIL_LDO(LDO2, ldo2, "in-ldo2", P, 800000, 3950000, 50000),
771 RAIL_LDO(LDO3, ldo3, "in-ldo3-5", P, 800000, 3950000, 50000),
772 RAIL_LDO(LDO4, ldo4, "in-ldo4-6", P, 800000, 1587500, 12500),
773 RAIL_LDO(LDO5, ldo5, "in-ldo3-5", P, 800000, 3950000, 50000),
774 RAIL_LDO(LDO6, ldo6, "in-ldo4-6", P, 800000, 3950000, 50000),
775 RAIL_LDO(LDO7, ldo7, "in-ldo7-8", N, 800000, 3950000, 50000),
776 RAIL_LDO(LDO8, ldo8, "in-ldo7-8", N, 800000, 3950000, 50000),
777};
778
761static int max77620_regulator_probe(struct platform_device *pdev) 779static int max77620_regulator_probe(struct platform_device *pdev)
762{ 780{
763 struct max77620_chip *max77620_chip = dev_get_drvdata(pdev->dev.parent); 781 struct max77620_chip *max77620_chip = dev_get_drvdata(pdev->dev.parent);
@@ -782,9 +800,14 @@ static int max77620_regulator_probe(struct platform_device *pdev)
782 case MAX77620: 800 case MAX77620:
783 rinfo = max77620_regs_info; 801 rinfo = max77620_regs_info;
784 break; 802 break;
785 default: 803 case MAX20024:
786 rinfo = max20024_regs_info; 804 rinfo = max20024_regs_info;
787 break; 805 break;
806 case MAX77663:
807 rinfo = max77663_regs_info;
808 break;
809 default:
810 return -EINVAL;
788 } 811 }
789 812
790 config.regmap = pmic->rmap; 813 config.regmap = pmic->rmap;
@@ -878,6 +901,7 @@ static const struct dev_pm_ops max77620_regulator_pm_ops = {
878static const struct platform_device_id max77620_regulator_devtype[] = { 901static const struct platform_device_id max77620_regulator_devtype[] = {
879 { .name = "max77620-pmic", }, 902 { .name = "max77620-pmic", },
880 { .name = "max20024-pmic", }, 903 { .name = "max20024-pmic", },
904 { .name = "max77663-pmic", },
881 {}, 905 {},
882}; 906};
883MODULE_DEVICE_TABLE(platform, max77620_regulator_devtype); 907MODULE_DEVICE_TABLE(platform, max77620_regulator_devtype);