Re: [PATCH v2 1/2] mfd: ucb1x00: Register software node for GPIO controller
From: Arnd Bergmann
Date: Tue Jul 07 2026 - 09:53:20 EST
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@xxxxxxxxx>
Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
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