Re: [PATCH] pinctrl: qcom: support gpio_chip .set_config call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 2, 2021 at 3:02 AM Shawn Guo <shawn.guo@xxxxxxxxxx> wrote:
>
> On Mon, Mar 01, 2021 at 07:07:03PM +0200, Andy Shevchenko wrote:
> > On Sun, Feb 28, 2021 at 4:55 AM Shawn Guo <shawn.guo@xxxxxxxxxx> wrote:
> > >
> > > In case of ACPI boot, GPIO core does the right thing to parse GPIO pin
> > > configs from ACPI table, and call into gpio_chip's .set_config hook for
> > > setting them up.  It enables such support on qcom platform by using
> > > generic config function, which in turn calls into .pin_config_set of
> > > pinconf for setting up hardware.  For qcom platform, it's possible to
> > > reuse pin group config functions for pin config hooks, because every pin
> > > is maintained as a single group.
> > >
> > > This change fixes the problem that Touchpad of Lenovo Flex 5G laptop
> > > doesn't work with ACPI boot, because PullUp config of Touchpad GpioInt
> > > pin is not set up by kernel driver.
> >
> > by the kernel
> >
> > ...
> >
> > >         .pin_config_group_get   = msm_config_group_get,
> > >         .pin_config_group_set   = msm_config_group_set,
> > > +       .pin_config_get         = msm_config_group_get,
> > > +       .pin_config_set         = msm_config_group_set,
> >
> > This can't be right. They have different semantics.
>
> As mentioned in the commit log, this works considering every pin is
> maintained as a single group on Qualcomm platform.  So configuring one
> pin is essentially to configure the group containing the pin.  I can do
> something like below, if you think that's easier to understand.

Yes, in your case you must have a selector == # of a pin for each
individual pin (not just declared that you have enough selectors to
cover the amount of pins and beyond).

If there is such a requirement, go with it.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux