public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: barco-p50-gpio: attach software node to its target GPIO device
@ 2026-03-31 11:28 Bartosz Golaszewski
  2026-04-01  2:09 ` Dmitry Torokhov
  0 siblings, 1 reply; 7+ messages in thread
From: Bartosz Golaszewski @ 2026-03-31 11:28 UTC (permalink / raw)
  To: Santosh Kumar Yadav, Peter Korsgaard, Hans de Goede,
	Ilpo Järvinen, Dmitry Torokhov
  Cc: platform-driver-x86, linux-kernel, brgl, Bartosz Golaszewski

The software node representing the GPIO controller to consumers is
"dangling": it's not really attached to the device. The GPIO lookup
relies on matching the name of the node to the chip's label. Set it as
the secondary firmware node of the platform device to enable proper
fwnode-based GPIO lookup.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/platform/x86/barco-p50-gpio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/barco-p50-gpio.c b/drivers/platform/x86/barco-p50-gpio.c
index 2a6d8607c402..5f4ffa584295 100644
--- a/drivers/platform/x86/barco-p50-gpio.c
+++ b/drivers/platform/x86/barco-p50-gpio.c
@@ -365,6 +365,8 @@ static int p50_gpio_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(&pdev->dev, ret, "failed to register software nodes");
 
+	set_secondary_fwnode(&pdev->dev, software_node_fwnode(&gpiochip_node));
+
 	led_info.fwnode = software_node_fwnode(&gpio_leds_node);
 	p50->leds_pdev = platform_device_register_full(&led_info);
 	if (IS_ERR(p50->leds_pdev)) {
-- 
2.47.3


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

end of thread, other threads:[~2026-04-03  7:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 11:28 [PATCH] platform/x86: barco-p50-gpio: attach software node to its target GPIO device Bartosz Golaszewski
2026-04-01  2:09 ` Dmitry Torokhov
2026-04-02  8:29   ` Bartosz Golaszewski
2026-04-02 15:53     ` Dmitry Torokhov
2026-04-02 16:39       ` Bartosz Golaszewski
2026-04-02 17:30         ` Dmitry Torokhov
2026-04-03  7:30           ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox