[PATCH] platform/x86: barco-p50-gpio: attach software node to its target GPIO device
From: Bartosz Golaszewski
Date: Tue Mar 31 2026 - 07:34:37 EST
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@xxxxxxxxxxxxxxxx>
---
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