Skip to contentSkip to conversation

powerpc/44x: Set GPIO chip firmware node

PATCH Superseded Rosen Penev 2 participants 3 messages May 15 – May 17

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/44x: Set GPIO chip firmware node

The PPC4xx GPIO driver stopped assigning an explicit firmware node to the gpio_chip when it moved away from of_mm_gpiochip_add_data().

Restore that association from the platform device so OF GPIO lookup can match phandles to the registered gpiochip.

Tested on: Cisco MX60W. No more probe deferral.

Assisted-by Codex:GPT-5.5
Fixes 1044dbaf2a77 ("powerpc/44x: Change GPIO driver to a proper platform driver")
---
 arch/powerpc/platforms/44x/gpio.c | 2 ++
 1 file changed, 2 insertions(+)
arch/powerpc/platforms/44x/gpio.c +2 -0
index d5824b7747b3..4d5176aa6895 100644
@@ -169,6 +169,8 @@ static int ppc4xx_gpio_probe(struct platform_device *ofdev)
 
 	gc = &chip->gc;
 
+	gc->parent = dev;
+	gc->fwnode = dev_fwnode(dev);
 	gc->base = -1;
 	gc->ngpio = 32;
 	gc->direction_input = ppc4xx_gpio_dir_in;
Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Rosen Penev

The PPC4xx GPIO driver stopped assigning an explicit firmware node to the gpio_chip when it moved away from of_mm_gpiochip_add_data().

Restore that association from the platform device so OF GPIO lookup can match phandles to the registered gpiochip.

Tested on: Cisco MX60W. No more probe deferral.

Assisted-by Codex:GPT-5.5
Fixes 1044dbaf2a77 ("powerpc/44x: Change GPIO driver to a proper platform driver")

Yours,
Linus Walleij

#2 lore raw
Quoted 9 lines · Linus Walleij
Quoted 6 lines · Rosen Penev

The PPC4xx GPIO driver stopped assigning an explicit firmware node to the gpio_chip when it moved away from of_mm_gpiochip_add_data().

Restore that association from the platform device so OF GPIO lookup can match phandles to the registered gpiochip.

Quoted 7 lines
Quoted 5 lines

Tested on: Cisco MX60W. No more probe deferral.

Assisted-by Codex:GPT-5.5
Fixes 1044dbaf2a77 ("powerpc/44x: Change GPIO driver to a proper platform driver")

dev was needed, not fwnode. Which makes sense as this is specified in dts.

https://patch.msgid.link/[email protected]
fixes this but that's not in a released kernel.

Quoted 3 lines

Yours,
Linus Walleij