linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] gpiolib: acpi: make fwnode take precedence in struct gpio_chip
@ 2021-12-23 10:38 Andy Shevchenko
  2021-12-23 10:38 ` [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode instead of of_node Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-12-23 10:38 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel, linux-acpi
  Cc: Hoan Tran, Serge Semin, Linus Walleij, Bartosz Golaszewski,
	Mika Westerberg

If the driver sets the fwnode in struct gpio_chip, let it take
precedence over the parent's fwnode.

This is a follow up to the commit 9126a738edc1 ("gpiolib: of: make
fwnode take precedence in struct gpio_chip").

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpiolib-acpi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index c7a0e56593e7..c0f6a25c3279 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -1339,6 +1339,9 @@ void acpi_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev)
 	/* Set default fwnode to parent's one if present */
 	if (gc->parent)
 		ACPI_COMPANION_SET(&gdev->dev, ACPI_COMPANION(gc->parent));
+
+	if (gc->fwnode)
+		device_set_node(&gdev->dev, gc->fwnode);
 }
 
 static int acpi_gpio_package_count(const union acpi_object *obj)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-03 10:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 10:38 [PATCH v1 1/2] gpiolib: acpi: make fwnode take precedence in struct gpio_chip Andy Shevchenko
2021-12-23 10:38 ` [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode instead of of_node Andy Shevchenko
2021-12-24 13:47   ` Serge Semin
2022-01-03 10:05   ` Bartosz Golaszewski
2021-12-23 12:04 ` [PATCH v1 1/2] gpiolib: acpi: make fwnode take precedence in struct gpio_chip Mika Westerberg
2022-01-03 10:06 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).