[PATCH 08/11] pinctrl: scmi: mark the GPIO functions
From: Clément Le Goffic
Date: Fri Oct 30 2026 - 12:02:24 EST
Register the functions flagged as GPIO with PINFUNCTION_FLAG_GPIO.
Signed-off-by: Clément Le Goffic <clegoffic@xxxxxxxxxxxx>
---
drivers/pinctrl/pinctrl-scmi.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index 1a14e254f011..24e02de543ca 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -443,6 +443,7 @@ static int pinctrl_scmi_get_functions(struct scmi_pinctrl *pmx)
{
unsigned int nr_funcs, nr_groups, i, j;
const unsigned int *group_ids;
+ struct pinfunction func;
bool pin_only, gpio;
const char *fname;
const char **gnames;
@@ -486,8 +487,12 @@ static int pinctrl_scmi_get_functions(struct scmi_pinctrl *pmx)
return ret;
}
- ret = pinmux_generic_add_function(pmx->pctldev, fname, gnames,
- nr_groups, NULL);
+ if (gpio)
+ func = PINCTRL_GPIO_PINFUNCTION(fname, gnames, nr_groups);
+ else
+ func = PINCTRL_PINFUNCTION(fname, gnames, nr_groups);
+
+ ret = pinmux_generic_add_pinfunction(pmx->pctldev, &func, NULL);
if (ret < 0)
return ret;
if (ret != i) {
--
2.56.0