From: Lee Jones <lee@kernel.org>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Linus Walleij <linusw@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v2 1/3] mfd: timberdale: set up a software node for the GPIO cell
Date: Thu, 26 Mar 2026 10:52:39 +0000 [thread overview]
Message-ID: <20260326105239.GJ1141718@google.com> (raw)
In-Reply-To: <20260316-gpio-timberdale-swnode-v2-1-ea0078066871@oss.qualcomm.com>
On Mon, 16 Mar 2026, Bartosz Golaszewski wrote:
> Create a software node with device properties for the GPIO cell and
> attach it to all the GPIO cells.
Could you elaborate a little on the motivation for this change, please?
I assume this is the first step in a larger plan to convert the GPIO
child driver to use device properties and remove the legacy 'platform_data'.
If so, it would be good to state that in the commit message or a cover
letter for the series.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> ---
> drivers/mfd/timberdale.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
> index a4d9c070d481a182890a58e4b8c850c4c29f7f17..8d7dfeaa76258d02e50528e39c4f7125d9201388 100644
> --- a/drivers/mfd/timberdale.c
> +++ b/drivers/mfd/timberdale.c
> @@ -181,6 +181,18 @@ static struct timbgpio_platform_data
> .irq_base = 200,
> };
>
> +static const struct property_entry timberdale_gpio_properties[] = {
> + PROPERTY_ENTRY_U32("ngpios", GPIO_NR_PINS),
> + PROPERTY_ENTRY_U32("gpio-base", 0),
This appears to introduce a functional change. The existing 'platform_data'
sets 'gpio_base' to -1, which results in dynamic allocation. Hard-coding
a base of 0 here is very likely to cause conflicts.
Should this property be removed to retain the dynamic allocation behaviour?
> + PROPERTY_ENTRY_U32("irq-base", 200),
This magic number should be defined.
> + { }
> +};
> +
> +static const struct software_node timberdale_gpio_swnode = {
> + .name = "timb-gpio",
> + .properties = timberdale_gpio_properties,
> +};
> +
> static const struct resource timberdale_gpio_resources[] = {
> {
> .start = GPIOOFFSET,
> @@ -392,6 +404,7 @@ static const struct mfd_cell timberdale_cells_bar0_cfg0[] = {
> .resources = timberdale_gpio_resources,
> .platform_data = &timberdale_gpio_platform_data,
> .pdata_size = sizeof(timberdale_gpio_platform_data),
> + .swnode = &timberdale_gpio_swnode,
> },
> {
> .name = "timb-video",
> @@ -454,6 +467,7 @@ static const struct mfd_cell timberdale_cells_bar0_cfg1[] = {
> .resources = timberdale_gpio_resources,
> .platform_data = &timberdale_gpio_platform_data,
> .pdata_size = sizeof(timberdale_gpio_platform_data),
> + .swnode = &timberdale_gpio_swnode,
> },
> {
> .name = "timb-mlogicore",
> @@ -516,6 +530,7 @@ static const struct mfd_cell timberdale_cells_bar0_cfg2[] = {
> .resources = timberdale_gpio_resources,
> .platform_data = &timberdale_gpio_platform_data,
> .pdata_size = sizeof(timberdale_gpio_platform_data),
> + .swnode = &timberdale_gpio_swnode,
> },
> {
> .name = "timb-video",
> @@ -566,6 +581,7 @@ static const struct mfd_cell timberdale_cells_bar0_cfg3[] = {
> .resources = timberdale_gpio_resources,
> .platform_data = &timberdale_gpio_platform_data,
> .pdata_size = sizeof(timberdale_gpio_platform_data),
> + .swnode = &timberdale_gpio_swnode,
> },
> {
> .name = "timb-video",
>
> --
> 2.47.3
>
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2026-03-26 10:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 9:30 [PATCH v2 0/3] gpio: timberdale: remove platform data header Bartosz Golaszewski
2026-03-16 9:30 ` [PATCH v2 1/3] mfd: timberdale: set up a software node for the GPIO cell Bartosz Golaszewski
2026-03-26 10:52 ` Lee Jones [this message]
2026-03-26 13:41 ` Bartosz Golaszewski
2026-03-16 9:30 ` [PATCH v2 2/3] gpio: timberdale: use device properties Bartosz Golaszewski
2026-03-16 15:09 ` Andy Shevchenko
2026-03-16 9:30 ` [PATCH v2 3/3] gpio: timberdale: remove platform data header Bartosz Golaszewski
2026-03-16 15:10 ` [PATCH v2 0/3] " Andy Shevchenko
2026-03-19 13:39 ` Linus Walleij
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=20260326105239.GJ1141718@google.com \
--to=lee@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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