Skip to contentSkip to conversation

platform/x86: pcengines-apuv2: attach software node to the gpiochip

PATCH In review Dmitry Torokhov 3 participants 3 messages Feb 13 – Mar 2

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: pcengines-apuv2: attach software node to the gpiochip

GPIO subsystem is switching the way it locates GPIO chip instances for GPIO references in software nodes from matching on node names to identity matching, which necessitates assigning firmware nodes (software nodes) to GPIO chips.

Attach apu2_gpiochip_node to the platform device representing the GPIO controller.

---
 drivers/platform/x86/pcengines-apuv2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/x86/pcengines-apuv2.c +2 -1
index 3b086863c6ac..3f19589d1ba0 100644
@@ -294,7 +294,8 @@ static int __init apu_board_init(void)
 	}
 
 	apu_gpio_pdev = apu_create_pdev(AMD_FCH_GPIO_DRIVER_NAME,
-					id->driver_data, sizeof(struct amd_fch_gpio_pdata), NULL);
+					id->driver_data, sizeof(struct amd_fch_gpio_pdata),
+					&apu2_gpiochip_node);
 	err = PTR_ERR_OR_ZERO(apu_gpio_pdev);
 	if (err)
 		goto err_unregister_swnodes;
Signature · 5 lines
2.53.0.310.g728cabbaf7-goog


-- 
Dmitry
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Dmitry Torokhov

GPIO subsystem is switching the way it locates GPIO chip instances for GPIO references in software nodes from matching on node names to identity matching, which necessitates assigning firmware nodes (software nodes) to GPIO chips.

Attach apu2_gpiochip_node to the platform device representing the GPIO controller.

---
 drivers/platform/x86/pcengines-apuv2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/x86/pcengines-apuv2.c +0 -0
index 3b086863c6ac..3f19589d1ba0 100644

drivers/platform/x86/pcengines-apuv2.c static int __init apu_board_init(void)

Quoted 10 lines
drivers/platform/x86/pcengines-apuv2.c +2 -2
@@ -294,7 +294,8 @@ static int __init apu_board_init(void)
        }
 
        apu_gpio_pdev = apu_create_pdev(AMD_FCH_GPIO_DRIVER_NAME,
-                                       id->driver_data, sizeof(struct amd_fch_gpio_pdata), NULL);
+                                       id->driver_data, sizeof(struct amd_fch_gpio_pdata),
+                                       &apu2_gpiochip_node);
        err = PTR_ERR_OR_ZERO(apu_gpio_pdev);
        if (err)
                goto err_unregister_swnodes;
--
maintainer
#2 lore raw
In reply to Dmitry Torokhov
Quoted 9 lines · Dmitry Torokhov

GPIO subsystem is switching the way it locates GPIO chip instances for GPIO references in software nodes from matching on node names to identity matching, which necessitates assigning firmware nodes (software nodes) to GPIO chips.

Attach apu2_gpiochip_node to the platform device representing the GPIO controller.

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: pcengines-apuv2: attach software node to the gpiochip

      commit: 0e59b31dbd3bfca96567e3d22518f4b6a7051a40

--
i.