]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulator: palmas: add input supply names
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 20 Mar 2013 13:56:37 +0000 (19:26 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 28 Mar 2013 00:26:04 +0000 (00:26 +0000)
Palmas regulator support the different input supply pins for each of
the rails. Fill the regulator info data with their input supply pin
names.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/palmas-regulator.c

index 3bd61bd02a4614ac9f529df7cc908c77e3284fa3..24bbd620d933400fa75f62f5a80c1b92be8698b8 100644 (file)
@@ -28,6 +28,7 @@
 
 struct regs_info {
        char    *name;
+       char    *sname;
        u8      vsel_addr;
        u8      ctrl_addr;
        u8      tstep_addr;
@@ -36,110 +37,131 @@ struct regs_info {
 static const struct regs_info palmas_regs_info[] = {
        {
                .name           = "SMPS12",
+               .sname          = "smps1-in",
                .vsel_addr      = PALMAS_SMPS12_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS12_CTRL,
                .tstep_addr     = PALMAS_SMPS12_TSTEP,
        },
        {
                .name           = "SMPS123",
+               .sname          = "smps1-in",
                .vsel_addr      = PALMAS_SMPS12_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS12_CTRL,
                .tstep_addr     = PALMAS_SMPS12_TSTEP,
        },
        {
                .name           = "SMPS3",
+               .sname          = "smps3-in",
                .vsel_addr      = PALMAS_SMPS3_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS3_CTRL,
        },
        {
                .name           = "SMPS45",
+               .sname          = "smps4-in",
                .vsel_addr      = PALMAS_SMPS45_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS45_CTRL,
                .tstep_addr     = PALMAS_SMPS45_TSTEP,
        },
        {
                .name           = "SMPS457",
+               .sname          = "smps4-in",
                .vsel_addr      = PALMAS_SMPS45_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS45_CTRL,
                .tstep_addr     = PALMAS_SMPS45_TSTEP,
        },
        {
                .name           = "SMPS6",
+               .sname          = "smps6-in",
                .vsel_addr      = PALMAS_SMPS6_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS6_CTRL,
                .tstep_addr     = PALMAS_SMPS6_TSTEP,
        },
        {
                .name           = "SMPS7",
+               .sname          = "smps7-in",
                .vsel_addr      = PALMAS_SMPS7_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS7_CTRL,
        },
        {
                .name           = "SMPS8",
+               .sname          = "smps8-in",
                .vsel_addr      = PALMAS_SMPS8_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS8_CTRL,
                .tstep_addr     = PALMAS_SMPS8_TSTEP,
        },
        {
                .name           = "SMPS9",
+               .sname          = "smps9-in",
                .vsel_addr      = PALMAS_SMPS9_VOLTAGE,
                .ctrl_addr      = PALMAS_SMPS9_CTRL,
        },
        {
                .name           = "SMPS10",
+               .sname          = "smps10-in",
        },
        {
                .name           = "LDO1",
+               .sname          = "ldo1-in",
                .vsel_addr      = PALMAS_LDO1_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO1_CTRL,
        },
        {
                .name           = "LDO2",
+               .sname          = "ldo2-in",
                .vsel_addr      = PALMAS_LDO2_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO2_CTRL,
        },
        {
                .name           = "LDO3",
+               .sname          = "ldo3-in",
                .vsel_addr      = PALMAS_LDO3_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO3_CTRL,
        },
        {
                .name           = "LDO4",
+               .sname          = "ldo4-in",
                .vsel_addr      = PALMAS_LDO4_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO4_CTRL,
        },
        {
                .name           = "LDO5",
+               .sname          = "ldo5-in",
                .vsel_addr      = PALMAS_LDO5_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO5_CTRL,
        },
        {
                .name           = "LDO6",
+               .sname          = "ldo6-in",
                .vsel_addr      = PALMAS_LDO6_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO6_CTRL,
        },
        {
                .name           = "LDO7",
+               .sname          = "ldo7-in",
                .vsel_addr      = PALMAS_LDO7_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO7_CTRL,
        },
        {
                .name           = "LDO8",
+               .sname          = "ldo8-in",
                .vsel_addr      = PALMAS_LDO8_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO8_CTRL,
        },
        {
                .name           = "LDO9",
+               .sname          = "ldo9-in",
                .vsel_addr      = PALMAS_LDO9_VOLTAGE,
                .ctrl_addr      = PALMAS_LDO9_CTRL,
        },
        {
                .name           = "LDOLN",
+               .sname          = "ldoln-in",
                .vsel_addr      = PALMAS_LDOLN_VOLTAGE,
                .ctrl_addr      = PALMAS_LDOLN_CTRL,
        },
        {
                .name           = "LDOUSB",
+               .sname          = "ldousb-in",
                .vsel_addr      = PALMAS_LDOUSB_VOLTAGE,
                .ctrl_addr      = PALMAS_LDOUSB_CTRL,
        },
@@ -709,6 +731,7 @@ static int palmas_regulators_probe(struct platform_device *pdev)
                else
                        config.init_data = NULL;
 
+               pmic->desc[id].supply_name = palmas_regs_info[id].sname;
                config.of_node = palmas_matches[id].of_node;
 
                rdev = regulator_register(&pmic->desc[id], &config);
@@ -755,6 +778,7 @@ static int palmas_regulators_probe(struct platform_device *pdev)
                else
                        config.init_data = NULL;
 
+               pmic->desc[id].supply_name = palmas_regs_info[id].sname;
                config.of_node = palmas_matches[id].of_node;
 
                rdev = regulator_register(&pmic->desc[id], &config);