Re: [PATCH 6/8] platform/x86: x86-android-tablets: Stop using gpiolib private APIs

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

 



On Mon, Sep 11, 2023 at 2:56 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, Sep 11, 2023 at 02:49:44PM +0200, Bartosz Golaszewski wrote:
> > On Sun, Sep 10, 2023 at 1:26 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
> > > On 9/10/23 10:24, Andy Shevchenko wrote:
> > > > On Sat, Sep 9, 2023 at 5:18 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> ...
>
> > > >> +       gpiod = devm_gpiod_get(&x86_android_tablet_device->dev, con_id, dflags);
>
> ^^^
>
> > > >> -       *desc = gpiod;
> > > >> +       if (desc)
> > > >> +               *desc = gpiod;
> > > >
> > > > Are we expecting that callers may not want the GPIO descriptor out of
> > > > this function?
> > > > Sounds a bit weird if so.
> > >
> > > Yes specifically the Charge-enable and OTG (Vboost enable) pins on the
> > > bq25892 charger on the Lenovo Yoga Tab 3 just need to be set to a fixed
> > > value, so we request the pins with GPIOD_OUT_LOW / _HIGH and then
> > > leave them at that value.
> >
> > You mean you leak the descriptor? It would warrant either a comment or
> > storing the descriptor somewhere and cleaning it up if the device can
> > be unbound (I guess it can since the driver can be built as module).
>
> Note devm_*() above.
>

Ah, nevermind my comment then.

Bart




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux