Re: [PATCH v4 2/2] pinctrl: ultrarisc: Add UltraRISC DP1000 pinctrl driver
From: Jia Wang
Date: Mon Jun 15 2026 - 01:54:14 EST
On 2026-06-13 12:48 -0400, Nathan Chancellor wrote:
> 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/
>
Hi Nathan,
Thanks for spotting this and for the report.
Linus has since proposed a fix by exporting pinctrl_get_group_selector():
https://lore.kernel.org/linux-gpio/20260613-export-get-group-selector-v1-1-fc4451a9ff0e@xxxxxxxxxx/
Thanks again for catching this.
> --
> Cheers,
> Nathan
>
Best regards,
Wang Jia