diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-12-16 16:12:27 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-12-22 03:09:56 +0100 |
commit | ce852837335abc874e4d943ebbbe7432465a413b (patch) | |
tree | 224d23d17fea7281f3dffec8c1d70c5301009eca /drivers/pinctrl/pinctrl-da9062.c | |
parent | dt-bindings: pinctrl: qcom: Add SDX65 pinctrl bindings (diff) | |
download | linux-ce852837335abc874e4d943ebbbe7432465a413b.tar.xz linux-ce852837335abc874e4d943ebbbe7432465a413b.zip |
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/pinctrl-da9062.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-da9062.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-da9062.c b/drivers/pinctrl/pinctrl-da9062.c index 1c08579f0198..0e0ac3f3ffef 100644 --- a/drivers/pinctrl/pinctrl-da9062.c +++ b/drivers/pinctrl/pinctrl-da9062.c @@ -14,6 +14,7 @@ #include <linux/bits.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/regmap.h> #include <linux/gpio/driver.h> @@ -256,6 +257,8 @@ static int da9062_pctl_probe(struct platform_device *pdev) struct da9062_pctl *pctl; int i; + device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent)); + pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); if (!pctl) return -ENOMEM; @@ -277,9 +280,6 @@ static int da9062_pctl_probe(struct platform_device *pdev) pctl->gc = reference_gc; pctl->gc.label = dev_name(&pdev->dev); pctl->gc.parent = &pdev->dev; -#ifdef CONFIG_OF_GPIO - pctl->gc.of_node = parent->of_node; -#endif platform_set_drvdata(pdev, pctl); |