[PATCH v2 0/3] pinctrl: scmi: Replace get function and group info with generic callbacks
From: Alex Tran
Date: Thu Sep 17 2026 - 18:56:39 EST
This series refactors the SCMI pinctrl driver to eliminate metadata
getter callbacks to be replaced with pinctrl and pinmux generics
provided by the pinctrl core.
Previously, the driver implemented its own get_functions_count,
get_function_name, get_function_groups, get_groups_count,
get_group_name, and get_group_pins callbacks, which required
maintaining driver metadata like the functions and count.
The pinctrl core already has support to store and manage this
topology in the pinctrl_dev via its own internal radix trees.
By registering functions and groups at probe time using
pinmux_generic_add_function and pinctrl_generic_add_group, the
driver can delegate group and function metadata management to
the core.
Signed-off-by: Alex Tran <alex.tran@xxxxxxxxxxxxxxxx>
---
Changes in v2:
- Add patch to select generic pinmux and pinctrl Kconfig symbols when PINCTRL_SCMI is selected
- Remove duplication of pins array while registering generic groups
- Check for duplicate function and group name during generic registration
- Allow functions with 0 groups and groups with 0 pins to be registered during probe but issue warning
- Link to v1: https://patch.msgid.link/20260731-scmi-pinctrl-generics-v1-0-8affd2b79a6b@xxxxxxxxxxxxxxxx
To: Sudeep Holla <sudeep.holla@xxxxxxxxxx>
To: Cristian Marussi <cristian.marussi@xxxxxxx>
To: Linus Walleij <linusw@xxxxxxxxxx>
Cc: arm-scmi@xxxxxxxxxxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-gpio@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
Alex Tran (3):
pinctrl: scmi: Replace pinmux ops get function info with generics
pinctrl: scmi: Replace pinctrl ops get group info with generics
pinctrl: kconfig: Select generic pinctrl helpers for scmi pinctrl
drivers/pinctrl/Kconfig | 2 +
drivers/pinctrl/pinctrl-scmi.c | 232 +++++++++++++++++++----------------------
2 files changed, 108 insertions(+), 126 deletions(-)
---
base-commit: 48a5a7ab8d6ab7090564339e039c421f315de912
change-id: 20260724-scmi-pinctrl-generics-746484c98b66
Best regards,
--
Alex Tran <alex.tran@xxxxxxxxxxxxxxxx>