[RFT PATCH v2] ARM: omap1: enable real software node lookup of GPIOs on Nokia 770

Arnd Bergmann arnd at kernel.org
Wed Feb 11 08:31:52 PST 2026


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 at 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



More information about the linux-arm-kernel mailing list