[PATCH v3 12/15] pinctrl: allow to mark pin functions as requestable GPIOs

Andy Shevchenko andy.shevchenko at gmail.com
Wed Jul 30 05:49:51 PDT 2025


On Wed, Jul 30, 2025 at 11:54 AM Bartosz Golaszewski <brgl at bgdev.pl> wrote:
>
> On Thu, Jul 24, 2025 at 2:22 PM Andy Shevchenko
> <andy.shevchenko at gmail.com> wrote:
> >
> > >  struct pinfunction {
> > >         const char *name;
> > >         const char * const *groups;
> > >         size_t ngroups;
> > > +       unsigned long flags;
> >
> > Not sure we need this. If the function is GPIO, pin control already
> > knows about this. The pin muxing has gpio request / release callbacks
> > that change the state. Why do we need an additional flag(s)?
> >
>
> I'm not following, how does the pin controller know that the function
> is GPIO exactly, other than by the bit set in this field?

AFAICS the gpio_owner != NULL means that. No need to have a duplicate
of this information.

-- 
With Best Regards,
Andy Shevchenko



More information about the Linux-mediatek mailing list