Re: [PATCH v3 3/7] pinctrl: pinctrl-generic: add __pinctrl_generic_pins_function_dt_node_to_map()

From: Linus Walleij

Date: Mon Mar 16 2026 - 05:38:04 EST


On Wed, Mar 11, 2026 at 8:08 PM Frank Li <Frank.Li@xxxxxxx> wrote:

> Introduce __pinctrl_generic_pins_function_dt_node_to_map() to allow
> passing private data and skip_npins to pinmux_generic_add_function().
>
> The 'skip_npins' to skip parse pins in dts because on boards MUX control
> chip switch the whole group together, so needn't handle each pins.
>
> Keep pinctrl_generic_pins_function_dt_node_to_map() as a wrapper
> calling the new helper with a NULL argument to preserve backward
> compatibility.
>
> Signed-off-by: Frank Li <Frank.Li@xxxxxxx>

Ad attested by several reviews, the pinctrl subsystem maintainer
strongly dislikes any use of __double_underscore_function_names().

The reason I dislike it is because it is ambiguous.

For example there are __compiler_intrinsics such as
__iomem and all the stuff from <linux/compiler_types.h>.

Then there are __non_atomics such as __set_bit().

This means __inner_function() just adds to this mess and creates
a big confusion for the mind.

That said: in this case you're just adding a parameter, just add
the parameter and change all of the in-tree users to pass false
or whatever you need, these is just one (1) in-tree user anyway.

Yours,
Linus Walleij