Re: [PATCH v4 2/2] pinctrl: ultrarisc: Add UltraRISC DP1000 pinctrl driver
From: Nathan Chancellor
Date: Sat Jun 13 2026 - 12:49:05 EST
On Wed, Jun 10, 2026 at 01:29:56PM +0800, Jia Wang wrote:
> diff --git a/drivers/pinctrl/ultrarisc/pinctrl-ultrarisc.c b/drivers/pinctrl/ultrarisc/pinctrl-ultrarisc.c
> new file mode 100644
> index 000000000000..8fb5b0ea5b93
> --- /dev/null
> +++ b/drivers/pinctrl/ultrarisc/pinctrl-ultrarisc.c
...
> +static bool ur_function_is_gpio(struct pinctrl_dev *pctldev,
> + unsigned int selector)
> +{
> + const struct function_desc *function;
> +
> + function = pinmux_generic_get_function(pctldev, selector);
> + if (!function)
> + return false;
> +
> + for (u32 i = 0; i < function->func->ngroups; i++) {
> + const char *func_name;
> + int group_selector;
> +
> + group_selector = pinctrl_get_group_selector(pctldev,
> + function->func->groups[i]);
> + if (group_selector < 0)
> + return false;
> +
> + func_name = ur_get_group_function(pctldev, group_selector, 0);
> + if (!func_name || strcmp(func_name, "gpio"))
> + return false;
> + }
> +
> + return true;
> +}
The usage of pinctrl_get_group_selector() in this function breaks the
build when this driver is a module because pinctrl_get_group_selector()
is not exported for modules:
ERROR: modpost: "pinctrl_get_group_selector" [drivers/pinctrl/ultrarisc/pinctrl-ultrarisc.ko] undefined!
Also reported by the robots:
https://lore.kernel.org/202606130210.ytVPxHlm-lkp@xxxxxxxxx/
--
Cheers,
Nathan