Re: [PATCH v12 3/6] pinctrl: core: Make pin group callbacks optional for pin-only drivers

From: Linus Walleij

Date: Sat May 23 2026 - 05:37:23 EST


On Fri, May 15, 2026 at 6:05 PM Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> wrote:

> Currently, the pinctrl core strictly requires all drivers to implement
> .get_groups_count and .get_group_name callbacks in their pinctrl_ops.
>
> However, for simple pinctrl drivers that act purely as GPIO controllers
> and pin-specific configuration proxies, without any concept of muxing or
> pin groups, this strict requirement forces the implementation of dummy
> callbacks just to satisfy pinctrl_check_ops().
>
> Relax this requirement for pin-only drivers by making the group callbacks
> optional when no muxing or group pin configuration support is provided.
> Update the core and debugfs helpers to check for the existence of these
> callbacks before invoking them.
>
> Drivers that provide muxing or group pin configuration operations still
> must implement group enumeration and naming callbacks, and are rejected
> at registration time if they do not.
>
> Suggested-by: Linus Walleij <linusw@xxxxxxxxxx>
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Since it's unlikely that the rest of the series will be merged for v7.2
I just applied this one patch to the pinctrl tree, because why not.

I stripped off the controversial Sashiko review tag until we know
what to do with these.

Yours,
Linus Walleij