]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: add new generic groups/function creation function for pinmux
authorConor Dooley <conor.dooley@microchip.com>
Tue, 19 May 2026 09:37:23 +0000 (10:37 +0100)
committerLinus Walleij <linusw@kernel.org>
Tue, 26 May 2026 11:32:52 +0000 (13:32 +0200)
commit6a350ccc4dc3f46ed2ee2592e3050956e415ef64
tree0d138d376603a9f6b06e42f3b227d66e6d695b45
parent2fe8d79e09de0f8f34d89d80462586b910e18a31
pinctrl: add new generic groups/function creation function for pinmux

Akin to my recently added pinctrl_generic_pins_functions_dt_node_to_map(),
create an analogue that performs the same role of dynamically creating
groups at runtime for controllers using the pinmux property.
The pinmux property is freeform, so this function mandates that the
upper 16 bits contain the pin and the lower 16 bits contains the mux
setting. The group's data pointer is populated with an array of the mux
settings for each pin it contains.

Since the node parsing and subsequent pinctrl core function calls are
practically identical to the pins + functions case, other than which
properties are examined, it makes sense to extract the common code from
pinctrl_generic_pins_function_dt_node_to_map() into a generic function
that takes the case-specific devicetree parsing function as an argument.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/pinconf.h
drivers/pinctrl/pinctrl-generic.c