Message ID | 20230909141816.58358-1-hdegoede@redhat.com |
---|---|
Headers | show |
Series | x86-android-tablets: Stop using gpiolib private APIs | expand |
On Sat, Sep 9, 2023 at 5:18 PM Hans de Goede <hdegoede@redhat.com> wrote: > > x86_dev_info.invalid_aei_gpiochip is no longer used by any boards > and the x86-android-tablets code should not use the gpiolib private > acpi_gpiochip_free_interrupts() function. Shouldn't this patch remove the private header inclusion as well?
On Sun, Sep 10, 2023 at 10:56 AM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > On Sat, Sep 9, 2023 at 5:18 PM Hans de Goede <hdegoede@redhat.com> wrote: > > > > x86_dev_info.invalid_aei_gpiochip is no longer used by any boards > > and the x86-android-tablets code should not use the gpiolib private > > acpi_gpiochip_free_interrupts() function. > > Shouldn't this patch remove the private header inclusion as well? Ah, it seems it uses more than that...
Hi Andy, I missed 1 remark: On 9/10/23 10:24, Andy Shevchenko wrote: >> - ret = x86_android_tablet_get_gpiod("INT33FF:02", 22, &gpiod); >> + ret = x86_android_tablet_get_gpiod("INT33FF:02", 22, "bq25892_0_ce", >> + true, GPIOD_OUT_HIGH, NULL); >> if (ret < 0) >> return ret; > > Hmm... Maybe better this function to return an error pointer or valid > pointer, and in the code you choose what to do with that? > > ... > >> /* OTG pin */ >> - ret = x86_android_tablet_get_gpiod("INT33FF:03", 19, &gpiod); >> + ret = x86_android_tablet_get_gpiod("INT33FF:03", 19, "bq25892_0_otg", >> + false, GPIOD_OUT_LOW, NULL); > > Ditto. Yes I did consider that, but x86_android_tablet_get_gpiod() already followed the return-by-reference model and I did not want to add changing that into the changes this patch already makes. Regards, Hans
On Sat, Sep 9, 2023 at 4:18 PM Hans de Goede <hdegoede@redhat.com> wrote: > As promised here is a patch-series to make the x86-android-tablets code > stop using gpiolib private APIs. This looks very helpful to me! Acked-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij