mfd: madera: Make pinctrl a child devicetree node
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Wed, 28 Feb 2018 12:44:00 +0000 (12:44 +0000)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:29 +0000 (20:22 +0300)
If the of_node of a pinctrl contains pinctrl-n entries the
pinctrl core will attempt to bind all those entries against
that pinctrl driver even if they refer to other pinctrl
drivers.

To work around this, move our pinctrl driver to be a child
node of our mfd so that its of_node doesn't contain any
pinctrl-n references.

Change-Id: I37138a860edbbee3fedcfc505b23557406d7486e
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
drivers/mfd/madera-core.c
drivers/pinctrl/cirrus/pinctrl-madera.c

index 783c2c9b92568fe059a2cf0b025e899dbd88e338..b78c3cf6507acb96a4f9a986aeb9d6b8fece3e87 100644 (file)
@@ -50,7 +50,10 @@ static const struct mfd_cell madera_ldo1_devs[] = {
 };
 
 static const struct mfd_cell madera_pinctrl_dev[] = {
-       { .name = "madera-pinctrl", },
+       {
+               .name = "madera-pinctrl",
+               .of_compatible = "cirrus,madera-pinctrl",
+       },
 };
 
 static const char * const cs47l15_supplies[] = {
index 1869d58e130cdf204d0969e1bde48c7c923b1f58..e91c34d0b88c22c401c17da19d6b21d314da592a 100644 (file)
@@ -1011,7 +1011,6 @@ static int madera_pin_probe(struct platform_device *pdev)
 
        priv->dev = &pdev->dev;
        priv->madera = madera;
-       pdev->dev.of_node = madera->dev->of_node;
 
        switch (madera->type) {
        case CS47L15: