Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] pinctrl: scmi: Replace get function and group info with generic callbacks
@ 2026-09-17 22:55 Alex Tran
  2026-09-17 22:55 ` [PATCH v2 1/3] pinctrl: scmi: Replace pinmux ops get function info with generics Alex Tran
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Alex Tran @ 2026-09-17 22:55 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Linus Walleij
  Cc: arm-scmi, linux-arm-kernel, linux-gpio, linux-kernel, Alex Tran

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@oss.qualcomm.com>
---
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@oss.qualcomm.com

To: Sudeep Holla <sudeep.holla@kernel.org>
To: Cristian Marussi <cristian.marussi@arm.com>
To: Linus Walleij <linusw@kernel.org>
Cc: arm-scmi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
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@oss.qualcomm.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-07  6:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 22:55 [PATCH v2 0/3] pinctrl: scmi: Replace get function and group info with generic callbacks Alex Tran
2026-09-17 22:55 ` [PATCH v2 1/3] pinctrl: scmi: Replace pinmux ops get function info with generics Alex Tran
2026-10-01 15:03   ` Sudeep Holla
2026-09-17 22:55 ` [PATCH v2 2/3] pinctrl: scmi: Replace pinctrl ops get group " Alex Tran
2026-10-01 15:18   ` Sudeep Holla
2026-09-17 22:55 ` [PATCH v2 3/3] pinctrl: kconfig: Select generic pinctrl helpers for scmi pinctrl Alex Tran
2026-10-01 15:19   ` Sudeep Holla
2026-10-07  6:48 ` [PATCH v2 0/3] pinctrl: scmi: Replace get function and group info with generic callbacks Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox