All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>, broonie@kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Lee Jones <lee@kernel.org>, Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Janusz Krzysztofik <jmkrzyszt@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	Russell King <linux@armlinux.org.uk>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	patches@opensource.cirrus.com, linux-samsung-soc@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH RFT 5/6] ARM: s3c: crag6410: use generic device properties for gpio-mmio
Date: Tue, 24 Jun 2025 17:33:01 +0100	[thread overview]
Message-ID: <aFrTPd1qCPDjtZuo@opensource.cirrus.com> (raw)
In-Reply-To: <20250624-gpio-mmio-pdata-v1-5-a58c72eb556a@linaro.org>

On Tue, Jun 24, 2025 at 03:19:16PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> The GPIO device in crag6410 is registered with struct bgpio_pdata passed
> as platform_data to the gpio-mmio driver. We want to remove the
> bgpio_pdata from the kernel and the gpio-mmio driver is now also able to
> get the relevant values from the software node. Set up device properties
> and switch to using platform_device_info to register the device as
> platform_add_devices() doesn't allow us to pass device properties to the
> driver model.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---

+ Broonie, as I think he might still use Cragganmore for testing.

But from my side I think it looks fine to me.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

>  arch/arm/mach-s3c/mach-crag6410.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
> index e5df2cb51ab27896d9dd80571f421e959db1fd1e..028169c7debf325ab6f51475d3595b92b1307189 100644
> --- a/arch/arm/mach-s3c/mach-crag6410.c
> +++ b/arch/arm/mach-s3c/mach-crag6410.c
> @@ -252,14 +252,17 @@ static struct resource crag6410_mmgpio_resource[] = {
>  	[0] = DEFINE_RES_MEM_NAMED(S3C64XX_PA_XM0CSN4, 1, "dat"),
>  };
>  
> -static struct platform_device crag6410_mmgpio = {
> +static const struct property_entry crag6410_mmgpio_props[] = {
> +	PROPERTY_ENTRY_U32("gpio-mmio,base", MMGPIO_GPIO_BASE),
> +	{ }
> +};
> +
> +static struct platform_device_info crag6410_mmgpio_devinfo = {
>  	.name		= "basic-mmio-gpio",
>  	.id		= -1,
> -	.resource	= crag6410_mmgpio_resource,
> -	.num_resources	= ARRAY_SIZE(crag6410_mmgpio_resource),
> -	.dev.platform_data = &(struct bgpio_pdata) {
> -		.base	= MMGPIO_GPIO_BASE,
> -	},
> +	.res		= crag6410_mmgpio_resource,
> +	.num_res	= ARRAY_SIZE(crag6410_mmgpio_resource),
> +	.properties	= crag6410_mmgpio_props,
>  };
>  
>  static struct platform_device speyside_device = {
> @@ -373,7 +376,6 @@ static struct platform_device *crag6410_devices[] __initdata = {
>  	&crag6410_gpio_keydev,
>  	&crag6410_dm9k_device,
>  	&s3c64xx_device_spi0,
> -	&crag6410_mmgpio,
>  	&crag6410_lcd_powerdev,
>  	&crag6410_backlight_device,
>  	&speyside_device,
> @@ -871,6 +873,7 @@ static void __init crag6410_machine_init(void)
>  
>  	pwm_add_table(crag6410_pwm_lookup, ARRAY_SIZE(crag6410_pwm_lookup));
>  	platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
> +	platform_device_register_full(&crag6410_mmgpio_devinfo);
>  
>  	gpio_led_register_device(-1, &gpio_leds_pdata);
>  
> 
> -- 
> 2.48.1
> 


  reply	other threads:[~2025-06-24 19:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 13:19 [PATCH RFT 0/6] gpio: mmio: remove struct bgpio_pdata Bartosz Golaszewski
2025-06-24 13:19 ` [PATCH RFT 1/6] gpio: mmio: drop the big-endian platform device variant Bartosz Golaszewski
2025-06-24 19:41   ` Linus Walleij
2025-06-24 13:19 ` [PATCH RFT 2/6] gpio: mmio: get chip label and GPIO base from device properties Bartosz Golaszewski
2025-06-24 19:43   ` Linus Walleij
2025-06-25  7:35     ` Bartosz Golaszewski
2025-06-25  8:53       ` Krzysztof Kozlowski
2025-06-25 10:23         ` Bartosz Golaszewski
2025-06-25 10:26           ` Krzysztof Kozlowski
2025-06-25 10:28             ` Bartosz Golaszewski
2025-06-25 10:42               ` Krzysztof Kozlowski
2025-06-24 13:19 ` [PATCH RFT 3/6] mfd: vexpress-sysreg: set-up software nodes for gpio-mmio Bartosz Golaszewski
2025-06-24 19:45   ` Linus Walleij
2025-06-26 13:22   ` Lee Jones
2025-06-26 13:25     ` Bartosz Golaszewski
2025-06-27 12:55       ` Lee Jones
2025-06-26 22:20   ` Liviu Dudau
2025-06-24 13:19 ` [PATCH RFT 4/6] ARM: omap1: ams-delta: use generic device properties " Bartosz Golaszewski
2025-06-24 19:45   ` Linus Walleij
2025-06-24 13:19 ` [PATCH RFT 5/6] ARM: s3c: crag6410: " Bartosz Golaszewski
2025-06-24 16:33   ` Charles Keepax [this message]
2025-06-24 19:46   ` Linus Walleij
2025-06-26 19:51   ` Krzysztof Kozlowski
2025-06-24 13:19 ` [PATCH RFT 6/6] gpio: mmio: remove struct bgpio_pdata 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=aFrTPd1qCPDjtZuo@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=alim.akhtar@samsung.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=jmkrzyszt@gmail.com \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=liviu.dudau@arm.com \
    --cc=lpieralisi@kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=sudeep.holla@arm.com \
    --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 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.