From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Arnd Bergmann <arnd@kernel.org>,
Linus Walleij <linusw@kernel.org>,
brgl@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] ARM: pxa: pxa25x: attach software node to its target GPIO controller
Date: Mon, 27 Apr 2026 11:58:15 +0100 [thread overview]
Message-ID: <ae9BR5vW_6jvNOYY@shell.armlinux.org.uk> (raw)
In-Reply-To: <20260427-pxa-gpio-swnodes-v2-3-86fc24b9e714@oss.qualcomm.com>
On Mon, Apr 27, 2026 at 12:14:34PM +0200, Bartosz Golaszewski wrote:
> 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 | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
> index 70509a5998142ec6b9c484e5f094751eda6db6cd..6875774f2cae1db4798d18c813f445bdc31b15de 100644
> --- a/arch/arm/mach-pxa/pxa25x.c
> +++ b/arch/arm/mach-pxa/pxa25x.c
> @@ -179,7 +179,6 @@ void __init pxa25x_map_io(void)
> }
>
> static struct platform_device *pxa25x_devices[] __initdata = {
> - &pxa25x_device_gpio,
> &pxa25x_device_udc,
> &pxa_device_pmu,
> &pxa_device_i2s,
> @@ -240,6 +239,10 @@ 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);
> + platform_device_register(&pxa25x_device_gpio);
> +
> pxa2xx_set_dmac_info(&pxa25x_dma_pdata);
> ret = platform_add_devices(pxa25x_devices,
> ARRAY_SIZE(pxa25x_devices));
Why do you need to explicitly register using platform_device_register()
rather than leaving the device in the pxa25x_devices list and letting
platform_add_devices() do that for you? platform_add_devices() is just
a wrapper around platform_device_register() which calls that for all
devices in the array.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2026-04-27 10:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 10:14 [PATCH v2 0/4] ARM: pxa: attach software nodes to the GPIO controllers Bartosz Golaszewski
2026-04-27 10:14 ` [PATCH v2 1/4] ARM: pxa: statify platform device definitions in spitz board file Bartosz Golaszewski
2026-04-27 20:17 ` Linus Walleij
2026-04-27 10:14 ` [PATCH v2 2/4] ARM: pxa: spitz: attach software nodes to their target GPIO controllers Bartosz Golaszewski
2026-04-27 10:14 ` [PATCH v2 3/4] ARM: pxa: pxa25x: attach software node to its target GPIO controller Bartosz Golaszewski
2026-04-27 10:58 ` Russell King (Oracle) [this message]
2026-04-27 10:14 ` [PATCH v2 4/4] ARM: pxa: pxa27x: " Bartosz Golaszewski
2026-04-27 10:49 ` [PATCH v2 0/4] ARM: pxa: attach software nodes to the GPIO controllers Arnd Bergmann
2026-04-27 11:01 ` Bartosz Golaszewski
2026-04-30 7:14 ` Bartosz Golaszewski
2026-04-30 11:57 ` Arnd Bergmann
2026-04-30 12:39 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae9BR5vW_6jvNOYY@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=arnd@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=daniel@zonque.org \
--cc=dmitry.torokhov@gmail.com \
--cc=haojian.zhuang@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.