mfd: madera: Add supply mapping for MICVDD
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 20 May 2019 09:06:28 +0000 (10:06 +0100)
committerLee Jones <lee.jones@linaro.org>
Tue, 2 Jul 2019 11:11:31 +0000 (12:11 +0100)
Currently we are relying on the exact match of the regulator name to
find MICVDD, we should add an explicit supply mapping to allow this to
be found more reliably.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/madera-core.c

index dcc5c28925f223801d0855b427bd2f358b4529ab..bc4e25b5b97db10c353e60075de3db36043e0fd6 100644 (file)
@@ -59,7 +59,11 @@ static const struct mfd_cell cs47l35_devs[] = {
        { .name = "madera-irq", },
        { .name = "madera-micsupp", },
        { .name = "madera-gpio", },
-       { .name = "madera-extcon", },
+       {
+               .name = "madera-extcon",
+               .parent_supplies = cs47l35_supplies,
+               .num_parent_supplies = 1, /* We only need MICVDD */
+       },
        {
                .name = "cs47l35-codec",
                .parent_supplies = cs47l35_supplies,
@@ -83,7 +87,11 @@ static const struct mfd_cell cs47l85_devs[] = {
        { .name = "madera-irq", },
        { .name = "madera-micsupp" },
        { .name = "madera-gpio", },
-       { .name = "madera-extcon", },
+       {
+               .name = "madera-extcon",
+               .parent_supplies = cs47l85_supplies,
+               .num_parent_supplies = 1, /* We only need MICVDD */
+       },
        {
                .name = "cs47l85-codec",
                .parent_supplies = cs47l85_supplies,
@@ -105,7 +113,11 @@ static const struct mfd_cell cs47l90_devs[] = {
        { .name = "madera-irq", },
        { .name = "madera-micsupp", },
        { .name = "madera-gpio", },
-       { .name = "madera-extcon", },
+       {
+               .name = "madera-extcon",
+               .parent_supplies = cs47l90_supplies,
+               .num_parent_supplies = 1, /* We only need MICVDD */
+       },
        {
                .name = "cs47l90-codec",
                .parent_supplies = cs47l90_supplies,