mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@kernel.org>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: "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>,
	"Hans de Goede" <hansg@kernel.org>,
	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: Thu, 12 Feb 2026 07:57:28 +0100	[thread overview]
Message-ID: <356b1997-ef0b-44f6-beeb-65f3cbed8681@app.fastmail.com> (raw)
In-Reply-To: <aY0oY-1rbLL3ract@google.com>

On Thu, Feb 12, 2026, at 02:12, Dmitry Torokhov wrote:
> On Wed, Feb 11, 2026 at 01:40:44PM -0800, Dmitry Torokhov wrote:
>> On Wed, Feb 11, 2026 at 05:31:52PM +0100, Arnd Bergmann wrote:
>> > 
>> > Do you know if there is a good way to do this without using static
>> > platform devices?
>> 
>> I wonder if something like below will help reducing boilerplate...
>
> And then we can change the gpio16xx like this (on top of Bartosz
> changes):

> @@ -49,27 +49,27 @@ static struct omap_gpio_reg_offs omap16xx_mpuio_regs = {
>  	.irqctrl	= OMAP_MPUIO_GPIO_INT_EDGE,
>  };
> 
> -static struct omap_gpio_platform_data omap16xx_mpu_gpio_config = {
> +static const struct omap_gpio_platform_data omap16xx_mpu_gpio_config 
> __initconst = {
>  	.is_mpuio		= true,
>  	.bank_width		= 16,
>  	.bank_stride		= 1,
>  	.regs                   = &omap16xx_mpuio_regs,
>  };
> 
> -const struct software_node omap16xx_mpu_gpio_swnode = { };
> +static const struct software_node omap16xx_mpu_gpio_swnode;
> 
> -static struct platform_device omap16xx_mpu_gpio = {
> -	.name           = "omap_gpio",
> -	.id             = 0,
> -	.dev            = {
> -		.platform_data = &omap16xx_mpu_gpio_config,
> -	},
> -	.num_resources = ARRAY_SIZE(omap16xx_mpu_gpio_resources),
> -	.resource = omap16xx_mpu_gpio_resources,
> +static const struct platform_device_info omap16xx_mpu_gpio_info __initconst = {
> +	.name = "omap_gpio",
> +	.id = 0,
> +	.data = &omap16xx_mpu_gpio_config,
> +	.size_data = sizeof(omap16xx_mpu_gpio_config),
> +	.res = omap16xx_mpu_gpio_resources,
> +	.num_res = ARRAY_SIZE(omap16xx_mpu_gpio_resources),
> +	.swnode = &omap16xx_mpu_gpio_swnode,
>  };

Yes, that looks really nice!

     Arnd

  reply	other threads:[~2026-02-12  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 13:13 Bartosz Golaszewski
2026-02-11 13:19 ` Bartosz Golaszewski
2026-02-11 16:31 ` Arnd Bergmann
2026-02-11 21:40   ` Dmitry Torokhov
2026-02-12  1:12     ` Dmitry Torokhov
2026-02-12  6:57       ` Arnd Bergmann [this message]
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=356b1997-ef0b-44f6-beeb-65f3cbed8681@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

all inboxes | Powered by JetHome®