diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-12-06 16:18:52 +0300 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2021-12-17 19:50:46 +0300 |
commit | 6dbe6c07f94f349098b512d88a1e1c5e2312b13d (patch) | |
tree | f9b6be6937c13c8494ba5263cb0f5b1ab8fc503e /drivers/gpio/gpio-twl6040.c | |
parent | 45a541a610af8156ee623b5906515796405ae9f5 (diff) | |
download | linux-6dbe6c07f94f349098b512d88a1e1c5e2312b13d.tar.xz |
gpio: 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.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/gpio/gpio-twl6040.c')
-rw-r--r-- | drivers/gpio/gpio-twl6040.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-twl6040.c b/drivers/gpio/gpio-twl6040.c index 648fb418d775..6c3fbf382dba 100644 --- a/drivers/gpio/gpio-twl6040.c +++ b/drivers/gpio/gpio-twl6040.c @@ -80,6 +80,8 @@ static int gpo_twl6040_probe(struct platform_device *pdev) struct twl6040 *twl6040 = dev_get_drvdata(twl6040_core_dev); int ret; + device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent)); + twl6040gpo_chip.base = -1; if (twl6040_get_revid(twl6040) < TWL6041_REV_ES2_0) @@ -88,9 +90,6 @@ static int gpo_twl6040_probe(struct platform_device *pdev) twl6040gpo_chip.ngpio = 1; /* twl6041 have 1 GPO */ twl6040gpo_chip.parent = &pdev->dev; -#ifdef CONFIG_OF_GPIO - twl6040gpo_chip.of_node = twl6040_core_dev->of_node; -#endif ret = devm_gpiochip_add_data(&pdev->dev, &twl6040gpo_chip, NULL); if (ret < 0) { |