diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-12-16 17:12:27 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-12-22 03:09:56 +0100 |
commit | ce852837335abc874e4d943ebbbe7432465a413b (patch) | |
tree | 224d23d17fea7281f3dffec8c1d70c5301009eca /drivers/pinctrl/cirrus | |
parent | 744d04fb4836cc1778cbe853fcac503794ba6fdf (diff) | |
download | linux-ce852837335abc874e4d943ebbbe7432465a413b.tar.bz2 |
pinctrl: Propagate firmware node from a parent device
When creating MFD platform devices the firmware node is left unset.
This, in particular, prevents GPIO library to use it for different
purposes. Propagate firmware node from the parent device and let
GPIO library do the right thing.
While at it, slightly modify the headers to reflect the usage of APIs.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/20211216151227.58687-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/cirrus')
-rw-r--r-- | drivers/pinctrl/cirrus/pinctrl-madera-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pinctrl/cirrus/pinctrl-madera-core.c b/drivers/pinctrl/cirrus/pinctrl-madera-core.c index dce2626384a9..e1cfbee3643a 100644 --- a/drivers/pinctrl/cirrus/pinctrl-madera-core.c +++ b/drivers/pinctrl/cirrus/pinctrl-madera-core.c @@ -8,8 +8,10 @@ #include <linux/err.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/regmap.h> #include <linux/slab.h> + #include <linux/pinctrl/machine.h> #include <linux/pinctrl/pinctrl.h> #include <linux/pinctrl/pinmux.h> @@ -1004,13 +1006,14 @@ static int madera_pin_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "%s\n", __func__); + device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent)); + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; priv->dev = &pdev->dev; priv->madera = madera; - pdev->dev.of_node = madera->dev->of_node; switch (madera->type) { case CS47L15: |