mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Lee Jones" <lee@kernel.org>,
	"Bartosz Golaszewski" <brgl@kernel.org>
Cc: mfd@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] mfd: ucb1x00: Register software node for GPIO controller
Date: Tue, 07 Jul 2026 15:46:25 +0200	[thread overview]
Message-ID: <48adc770-9d55-47a7-a779-cad73b587b83@app.fastmail.com> (raw)
In-Reply-To: <20260706-ucb1x00-assabet-swnode-v2-1-e6271ea3d3dc@gmail.com>

On Tue, Jul 7, 2026, at 07:01, Dmitry Torokhov wrote:
> Define a static software node for the UCB1x00 GPIO controller and attach
> it to the core MFD device in ucb1x00_probe(). This node will also be
> used by the created GPIO chip.
>
> This allows machine subdrivers (such as Assabet evaluation board
> support) to reference the UCB1x00 GPIO controller in property entries
> when converting legacy platform data to software nodes, resolving pin
> bindings directly via the attached firmware node without relying on
> name matching.
>
> Assisted-by: Antigravity:gemini-3.5-flash
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>

Assabet should be going away soon, so it really doesn't
matter much.

> +const struct software_node ucb1x00_gpiochip_node = {
> +	.name = "ucb1x00-gpio",
> +};
> +EXPORT_SYMBOL_GPL(ucb1x00_gpiochip_node);

It does feel a bit counterproductive if you have to add more
exported symbols.

> index ede237384723..214c71a12e84 100644
> --- a/include/linux/mfd/ucb1x00.h
> +++ b/include/linux/mfd/ucb1x00.h
> @@ -103,6 +103,9 @@
>  #define UCB_MODE_DYN_VFLAG_ENA	(1 << 12)
>  #define UCB_MODE_AUD_OFF_CAN	(1 << 13)
> 
> +struct software_node;
> +extern const struct software_node ucb1x00_gpiochip_node;

No need for the seperate declaration of the struct tag,
you only need this if the first user is in the argument
list of a function, but not for a global variable.

     Arnd

  reply	other threads:[~2026-07-07 13:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07  5:01 [PATCH v2 0/2] mfd: ucb1x00: Convert Assabet gpio-keys to software nodes Dmitry Torokhov
2026-07-07  5:01 ` [PATCH v2 1/2] mfd: ucb1x00: Register software node for GPIO controller Dmitry Torokhov
2026-07-07 13:46   ` Arnd Bergmann [this message]
2026-07-16 12:40     ` Lee Jones
2026-07-16 13:05       ` Arnd Bergmann
2026-07-16 14:00         ` Lee Jones
2026-07-16 15:06           ` Dmitry Torokhov
2026-07-16 15:49             ` Lee Jones
2026-07-07  5:01 ` [PATCH v2 2/2] mfd: ucb1x00: Convert Assabet gpio-keys to use software nodes Dmitry Torokhov
2026-07-16 13:06   ` Lee Jones
2026-07-16 15:15     ` Dmitry Torokhov
2026-07-16 15:48       ` Lee Jones
2026-07-07  8:07 ` [PATCH v2 0/2] mfd: ucb1x00: Convert Assabet gpio-keys to " Bartosz Golaszewski
2026-07-16 15:49 ` Lee Jones

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=48adc770-9d55-47a7-a779-cad73b587b83@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=brgl@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    /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®