Re: [PATCH 0/4] add support for bias pull-disable

Andy Shevchenko
2022-07-14T09:13:38Z

On Thu, Jul 14, 2022 at 9:10 AM Nuno Sá <noname.nuno@gmail.com> wrote:
> On Wed, 2022-07-13 at 20:39 +0300, Andy Shevchenko wrote:
> > On Wed, Jul 13, 2022 at 03:14:17PM +0200, Nuno Sá wrote:
> > > The gpio core looks at 'FLAG_BIAS_DISABLE' in preparation of
> > > calling the
> > > gpiochip 'set_config()' hook. However, AFAICT, there's no way that
> > > this
> > > flag is set because there's no support for it in firwmare code.
> > > Moreover,
> > > in 'gpiod_configure_flags()', only pull-ups and pull-downs are
> > > being
> > > handled.
> >
> > Isn't it enough?
>
> I might be missing something but don't think so. Look at this driver
> which seems a lot like the reference i put in the cover:
>
> https://elixir.bootlin.com/linux/v5.19-rc6/source/drivers/gpio/gpio-pca953x.c#L573
>
> I just don't see an in-kernel path (I'm aware now that we can get here
> through gpio cdev) to get to the point where we want to disable the pin
> BIAS.

Ah, that driver should be converted to pin control. It's definitely a
problem with the driver.

But let me look into the library code to understand better what your
point is in general.

P.S. Pin muxing has nothing to do with the pin control, many (I guess
more than 90%) of GPIO controllers do have pin control features.

--
With Best Regards,
Andy Shevchenko