drivers/pinctrl/pinctrl-scmi.c | 223 ++++++++++++++++++----------------------- 1 file changed, 97 insertions(+), 126 deletions(-)
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>
---
Alex Tran (2):
pinctrl: scmi: Replace pinmux ops get function info with generics
pinctrl: scmi: Replace pinctrl ops get group info with generics
drivers/pinctrl/pinctrl-scmi.c | 223 ++++++++++++++++++-----------------------
1 file changed, 97 insertions(+), 126 deletions(-)
---
base-commit: 48a5a7ab8d6ab7090564339e039c421f315de912
change-id: 20260724-scmi-pinctrl-generics-746484c98b66
Best regards,
--
Alex Tran <alex.tran@oss.qualcomm.com>
On Fri, Jul 31, 2026 at 10:49:31AM -0700, Alex Tran wrote: > 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. Hi Alex, I gave it a go at this series on an emulated setup and with these changes I get: root@deb-guest:~# modprobe pinctrl-scmi [ 15.329932] scmi-pinctrl scmi_dev.4: error -EINVAL: Failed to register functions [ 15.330259] scmi-pinctrl scmi_dev.4: probe with driver scmi-pinctrl failed with error -22 ...not debugged any further. Thanks, Cristian
> Hi Alex, > > I gave it a go at this series on an emulated setup and with these > changes I get: > > root@deb-guest:~# modprobe pinctrl-scmi > [ 15.329932] scmi-pinctrl scmi_dev.4: error -EINVAL: Failed to register functions > [ 15.330259] scmi-pinctrl scmi_dev.4: probe with driver scmi-pinctrl failed with error -22 > > ...not debugged any further. > > Thanks, > Cristian Hi Cristian, I've tested this series on sa8797p hardware and did not experience any issues with registering functions during probe. Can you provide me with the pin topology of your emulated setup? I have a hunch that the topology may contain a function with 0 groups which is why -EINVAL is being returned. The previous pinctrl_scmi_get_function_groups callback considered a function with no groups invalid. Best, Alex
On Fri, Aug 14, 2026 at 05:05:27PM -0700, Alex Tran wrote: > > Hi Alex, > > > > I gave it a go at this series on an emulated setup and with these > > changes I get: > > > > root@deb-guest:~# modprobe pinctrl-scmi > > [ 15.329932] scmi-pinctrl scmi_dev.4: error -EINVAL: Failed to register functions > > [ 15.330259] scmi-pinctrl scmi_dev.4: probe with driver scmi-pinctrl failed with error -22 > > > > ...not debugged any further. > > > > Thanks, > > Cristian > Hi Cristian, > > I've tested this series on sa8797p hardware and did not experience any issues > with registering functions during probe. Can you provide me with the pin > topology of your emulated setup? I have a hunch that the topology may > contain a function with 0 groups which is why -EINVAL is being returned. > The previous pinctrl_scmi_get_function_groups callback considered a function > with no groups invalid. I found couple of feedback from sashiko valid, can you take a look at all the comments there[1] ? -- Regards, Sudeep [1] https://sashiko.dev/#/patchset/20260731-scmi-pinctrl-generics-v1-0-8affd2b79a6b@oss.qualcomm.com
On 9/7/2026 1:53 AM, Sudeep Holla wrote: > On Fri, Aug 14, 2026 at 05:05:27PM -0700, Alex Tran wrote: >>> Hi Alex, >>> >>> I gave it a go at this series on an emulated setup and with these >>> changes I get: >>> >>> root@deb-guest:~# modprobe pinctrl-scmi >>> [ 15.329932] scmi-pinctrl scmi_dev.4: error -EINVAL: Failed to register functions >>> [ 15.330259] scmi-pinctrl scmi_dev.4: probe with driver scmi-pinctrl failed with error -22 >>> >>> ...not debugged any further. >>> >>> Thanks, >>> Cristian >> Hi Cristian, >> >> I've tested this series on sa8797p hardware and did not experience any issues >> with registering functions during probe. Can you provide me with the pin >> topology of your emulated setup? I have a hunch that the topology may >> contain a function with 0 groups which is why -EINVAL is being returned. >> The previous pinctrl_scmi_get_function_groups callback considered a function >> with no groups invalid. > I found couple of feedback from sashiko valid, can you take a look at all the > comments there[1] ? Hi Sudeep, Sure, I'll address all the relevant comments from the feedback and send in a revised version once ready. BR, Alex
© 2016 - 2026 Red Hat, Inc.