public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@kernel.org>
To: "Bartosz Golaszewski" <bartosz.golaszewski@oss.qualcomm.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Janusz Krzysztofik" <jmkrzyszt@gmail.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>
Cc: Linux-OMAP <linux-omap@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Bartosz Golaszewski" <brgl@kernel.org>
Subject: Re: [RFT PATCH v2] ARM: omap1: enable real software node lookup of GPIOs on Nokia 770
Date: Wed, 11 Feb 2026 17:31:52 +0100	[thread overview]
Message-ID: <213b82de-fee8-4ebf-a8ee-d8ca783ce403@app.fastmail.com> (raw)
In-Reply-To: <20260211131350.126966-1-bartosz.golaszewski@oss.qualcomm.com>

On Wed, Feb 11, 2026, at 14:13, Bartosz Golaszewski wrote:
> Currently the board file for Nokia 770 creates dummy software nodes not
> attached in any way to the actual GPIO controller devices and uses the
> fact that GPIOLIB matching swnode's name to the GPIO chip's label during
> software node lookup. This behavior is wrong and we want to remove it.
> To that end, we need to first convert all existing users to creating
> actual fwnode links.
>
> Create real software nodes for GPIO controllers on OMAP16xx and
> reference them from the software nodes in the nokia board file.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> ---

I don't see mistakes here, and I don't want to throw a wrench in
this patch, but I wonder if there is a way to take this one step further:

> @@ -244,6 +263,14 @@ static int __init omap16xx_gpio_init(void)
>  		iounmap(base);
> 
>  		platform_device_register(omap16xx_gpio_dev[i]);
> +
> +		ret = device_add_software_node(&omap16xx_gpio_dev[i]->dev,
> +					       omap16xx_gpio_swnodes[i]);
> +
> +		if (ret) {
> +			dev_err(&pdev->dev, "Failed to add software node.\n");
> +			return ret;
> +		}

I was planning to go through the remaining 'static struct platform_device'
definitions in arch/arm/ after the planned board file removal and
try to convert these to 'platform_device_info' or similar, using
platform_device_register_full(). Since that function already contains
code to dynamically allocate the software_node, I had hoped that
a lot of this would just go away.

However, I see that your patch creates pointers to those software_node
instances, so  think that would become a bit harder, but I have not
actually tried it.

Do you know if there is a good way to do this without using static
platform devices?

     Arnd


  parent reply	other threads:[~2026-02-11 16:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 13:13 [RFT PATCH v2] ARM: omap1: enable real software node lookup of GPIOs on Nokia 770 Bartosz Golaszewski
2026-02-11 13:19 ` Bartosz Golaszewski
2026-02-11 16:31 ` Arnd Bergmann [this message]
2026-02-11 21:40   ` Dmitry Torokhov
2026-02-12  1:12     ` Dmitry Torokhov
2026-02-12  6:57       ` Arnd Bergmann
2026-02-12 11:40   ` Bartosz Golaszewski
2026-02-12 11:45     ` Arnd Bergmann

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=213b82de-fee8-4ebf-a8ee-d8ca783ce403@app.fastmail.com \
    --to=arnd@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hansg@kernel.org \
    --cc=jmkrzyszt@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=tony@atomide.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox