* [PATCH v3 1/4] ARM: pxa: statify platform device definitions in spitz board file
2026-04-30 12:57 [PATCH v3 0/4] ARM: pxa: attach software nodes to the GPIO controllers Bartosz Golaszewski
@ 2026-04-30 12:57 ` Bartosz Golaszewski
2026-04-30 12:57 ` [PATCH v3 2/4] ARM: pxa: spitz: attach software nodes to their target GPIO controllers Bartosz Golaszewski
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-04-30 12:57 UTC (permalink / raw)
To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Dmitry Torokhov, Arnd Bergmann, Linus Walleij
Cc: brgl, linux-arm-kernel, linux-gpio, linux-kernel,
Bartosz Golaszewski
The scoop devices are not used outside of this board file so make them
static.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
arch/arm/mach-pxa/spitz.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index c0b1f7e6be87411359b0020257ff12c73bbcbae3..3284b9f62be970555042a7292993e45d56fde47e 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -165,7 +165,7 @@ static struct scoop_config spitz_scoop_1_setup = {
.gpio_base = SPITZ_SCP_GPIO_BASE,
};
-struct platform_device spitz_scoop_1_device = {
+static struct platform_device spitz_scoop_1_device = {
.name = "sharp-scoop",
.id = 0,
.dev = {
@@ -192,7 +192,7 @@ static struct scoop_config spitz_scoop_2_setup = {
.gpio_base = SPITZ_SCP2_GPIO_BASE,
};
-struct platform_device spitz_scoop_2_device = {
+static struct platform_device spitz_scoop_2_device = {
.name = "sharp-scoop",
.id = 1,
.dev = {
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3 2/4] ARM: pxa: spitz: attach software nodes to their target GPIO controllers
2026-04-30 12:57 [PATCH v3 0/4] ARM: pxa: attach software nodes to the GPIO controllers Bartosz Golaszewski
2026-04-30 12:57 ` [PATCH v3 1/4] ARM: pxa: statify platform device definitions in spitz board file Bartosz Golaszewski
@ 2026-04-30 12:57 ` Bartosz Golaszewski
2026-04-30 12:57 ` [PATCH v3 3/4] ARM: pxa: pxa25x: attach software node to its target GPIO controller Bartosz Golaszewski
2026-04-30 12:57 ` [PATCH v3 4/4] ARM: pxa: pxa27x: " Bartosz Golaszewski
3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-04-30 12:57 UTC (permalink / raw)
To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Dmitry Torokhov, Arnd Bergmann, Linus Walleij
Cc: brgl, linux-arm-kernel, linux-gpio, linux-kernel,
Bartosz Golaszewski
Software nodes describing the GPIO controllers for the spitz platform
are currently "dangling" - they're not actually attached to the relevant
controllers and don't allow real fwnode lookup. Attach them either by
directly assigning them to the struct device or by using the i2c board
info struct.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
arch/arm/mach-pxa/spitz.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 3284b9f62be970555042a7292993e45d56fde47e..5091b601c4e1bf25cfee07429881894929853dfe 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -204,11 +204,15 @@ static struct platform_device spitz_scoop_2_device = {
static void __init spitz_scoop_init(void)
{
+ spitz_scoop_1_device.dev.fwnode = software_node_fwnode(&spitz_scoop_1_gpiochip_node);
platform_device_register(&spitz_scoop_1_device);
/* Akita doesn't have the second SCOOP chip */
- if (!machine_is_akita())
+ if (!machine_is_akita()) {
+ spitz_scoop_2_device.dev.fwnode = software_node_fwnode(
+ &spitz_scoop_2_gpiochip_node);
platform_device_register(&spitz_scoop_2_device);
+ }
}
/* Power control is shared with between one of the CF slots and SD */
@@ -988,6 +992,7 @@ static struct i2c_board_info spitz_i2c_devs[] = {
.type = "max7310",
.addr = 0x18,
.platform_data = &akita_pca953x_pdata,
+ .swnode = &akita_max7310_gpiochip_node,
},
};
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3 3/4] ARM: pxa: pxa25x: attach software node to its target GPIO controller
2026-04-30 12:57 [PATCH v3 0/4] ARM: pxa: attach software nodes to the GPIO controllers Bartosz Golaszewski
2026-04-30 12:57 ` [PATCH v3 1/4] ARM: pxa: statify platform device definitions in spitz board file Bartosz Golaszewski
2026-04-30 12:57 ` [PATCH v3 2/4] ARM: pxa: spitz: attach software nodes to their target GPIO controllers Bartosz Golaszewski
@ 2026-04-30 12:57 ` Bartosz Golaszewski
2026-04-30 12:57 ` [PATCH v3 4/4] ARM: pxa: pxa27x: " Bartosz Golaszewski
3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-04-30 12:57 UTC (permalink / raw)
To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Dmitry Torokhov, Arnd Bergmann, Linus Walleij
Cc: brgl, linux-arm-kernel, linux-gpio, linux-kernel,
Bartosz Golaszewski
Software node describing the GPIO controller for the pxa25x platforms is
currently "dangling" - it's not actually attached to the relevant
controller and doesn't allow real fwnode lookup. Attach it once it's
registered as a firmware node before adding the platform device.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
arch/arm/mach-pxa/pxa25x.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 70509a5998142ec6b9c484e5f094751eda6db6cd..a4e878be004a09a6ee464c8f09e91be249a224b2 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -240,6 +240,9 @@ static int __init pxa25x_init(void)
if (!of_have_populated_dt()) {
software_node_register(&pxa2xx_gpiochip_node);
+ pxa25x_device_gpio.dev.fwnode = software_node_fwnode(
+ &pxa2xx_gpiochip_node);
+
pxa2xx_set_dmac_info(&pxa25x_dma_pdata);
ret = platform_add_devices(pxa25x_devices,
ARRAY_SIZE(pxa25x_devices));
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3 4/4] ARM: pxa: pxa27x: attach software node to its target GPIO controller
2026-04-30 12:57 [PATCH v3 0/4] ARM: pxa: attach software nodes to the GPIO controllers Bartosz Golaszewski
` (2 preceding siblings ...)
2026-04-30 12:57 ` [PATCH v3 3/4] ARM: pxa: pxa25x: attach software node to its target GPIO controller Bartosz Golaszewski
@ 2026-04-30 12:57 ` Bartosz Golaszewski
3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-04-30 12:57 UTC (permalink / raw)
To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Russell King,
Dmitry Torokhov, Arnd Bergmann, Linus Walleij
Cc: brgl, linux-arm-kernel, linux-gpio, linux-kernel,
Bartosz Golaszewski
Software node describing the GPIO controller for the pxa27x platforms is
currently "dangling" - it's not actually attached to the relevant
controller and doesn't allow real fwnode lookup. Attach it once it's
registered as a firmware node before adding the platform device.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
arch/arm/mach-pxa/pxa27x.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index ff63619790383859ba111e3efe7619aa6cbd248e..49c677f2dac156445447ebdd7a99f3463a762d20 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -342,6 +342,9 @@ static int __init pxa27x_init(void)
if (!of_have_populated_dt()) {
software_node_register(&pxa2xx_gpiochip_node);
+ pxa27x_device_gpio.dev.fwnode = software_node_fwnode(
+ &pxa2xx_gpiochip_node);
+
pxa2xx_set_dmac_info(&pxa27x_dma_pdata);
ret = platform_add_devices(devices,
ARRAY_SIZE(devices));
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread