mfd: arizona: Specify supply mappings for Arizona CODECs
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 15 Oct 2013 19:14:22 +0000 (20:14 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 23 Oct 2013 11:17:21 +0000 (12:17 +0100)
The CODEC power supplies should be looked up on the Arizona device as
they will be created here by device tree also update the only user of
non-device tree bindings.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm/mach-s3c64xx/mach-crag6410.c
drivers/mfd/arizona-core.c

index eb8e5a1..f27ca3b 100644 (file)
@@ -310,10 +310,6 @@ static struct regulator_consumer_supply wallvdd_consumers[] = {
 
        REGULATOR_SUPPLY("SPKVDDL", "spi0.1"),
        REGULATOR_SUPPLY("SPKVDDR", "spi0.1"),
-       REGULATOR_SUPPLY("SPKVDDL", "wm5102-codec"),
-       REGULATOR_SUPPLY("SPKVDDR", "wm5102-codec"),
-       REGULATOR_SUPPLY("SPKVDDL", "wm5110-codec"),
-       REGULATOR_SUPPLY("SPKVDDR", "wm5110-codec"),
 
        REGULATOR_SUPPLY("DC1VDD", "0-0034"),
        REGULATOR_SUPPLY("DC2VDD", "0-0034"),
@@ -653,14 +649,6 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] = {
        REGULATOR_SUPPLY("DBVDD3", "spi0.1"),
        REGULATOR_SUPPLY("LDOVDD", "spi0.1"),
        REGULATOR_SUPPLY("CPVDD", "spi0.1"),
-
-       REGULATOR_SUPPLY("DBVDD2", "wm5102-codec"),
-       REGULATOR_SUPPLY("DBVDD3", "wm5102-codec"),
-       REGULATOR_SUPPLY("CPVDD", "wm5102-codec"),
-
-       REGULATOR_SUPPLY("DBVDD2", "wm5110-codec"),
-       REGULATOR_SUPPLY("DBVDD3", "wm5110-codec"),
-       REGULATOR_SUPPLY("CPVDD", "wm5110-codec"),
 };
 
 static struct regulator_init_data pvdd_1v8 = {
index 5ac3aa4..022b186 100644 (file)
@@ -569,13 +569,25 @@ static struct mfd_cell early_devs[] = {
        { .name = "arizona-ldo1" },
 };
 
+static const char *wm5102_supplies[] = {
+       "DBVDD2",
+       "DBVDD3",
+       "CPVDD",
+       "SPKVDDL",
+       "SPKVDDR",
+};
+
 static struct mfd_cell wm5102_devs[] = {
        { .name = "arizona-micsupp" },
        { .name = "arizona-extcon" },
        { .name = "arizona-gpio" },
        { .name = "arizona-haptics" },
        { .name = "arizona-pwm" },
-       { .name = "wm5102-codec" },
+       {
+               .name = "wm5102-codec",
+               .parent_supplies = wm5102_supplies,
+               .num_parent_supplies = ARRAY_SIZE(wm5102_supplies),
+       },
 };
 
 static struct mfd_cell wm5110_devs[] = {
@@ -584,7 +596,17 @@ static struct mfd_cell wm5110_devs[] = {
        { .name = "arizona-gpio" },
        { .name = "arizona-haptics" },
        { .name = "arizona-pwm" },
-       { .name = "wm5110-codec" },
+       {
+               .name = "wm5110-codec",
+               .parent_supplies = wm5102_supplies,
+               .num_parent_supplies = ARRAY_SIZE(wm5102_supplies),
+       },
+};
+
+static const char *wm8997_supplies[] = {
+       "DBVDD2",
+       "CPVDD",
+       "SPKVDD",
 };
 
 static struct mfd_cell wm8997_devs[] = {
@@ -593,7 +615,11 @@ static struct mfd_cell wm8997_devs[] = {
        { .name = "arizona-gpio" },
        { .name = "arizona-haptics" },
        { .name = "arizona-pwm" },
-       { .name = "wm8997-codec" },
+       {
+               .name = "wm8997-codec",
+               .parent_supplies = wm8997_supplies,
+               .num_parent_supplies = ARRAY_SIZE(wm8997_supplies),
+       },
 };
 
 int arizona_dev_init(struct arizona *arizona)