platform/x86: x86-android-tablets: Stop using gpiolib private APIs
authorHans de Goede <hdegoede@redhat.com>
Sat, 9 Sep 2023 14:18:14 +0000 (16:18 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 11 Sep 2023 11:28:58 +0000 (13:28 +0200)
commit4014ae236b1d490f5db798d159a03470aec71a40
treee06e84bc010b70add95b10c5a7fb51687cefe440
parent8b57d33a6fdbb53d03da762b31e65a1027f74caf
platform/x86: x86-android-tablets: Stop using gpiolib private APIs

Refactor x86_android_tablet_get_gpiod() to no longer use
gpiolib private functions like gpiochip_find().

As a bonus this allows specifying that the GPIO is active-low,
like the /CE (charge enable) pin on the bq25892 charger on
the Lenovo Yoga Tablet 3.

Reported-by: Bartosz Golaszewski <brgl@bgdev.pl>
Closes: https://lore.kernel.org/platform-driver-x86/20230905185309.131295-12-brgl@bgdev.pl/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230909141816.58358-7-hdegoede@redhat.com
drivers/platform/x86/x86-android-tablets/asus.c
drivers/platform/x86/x86-android-tablets/core.c
drivers/platform/x86/x86-android-tablets/lenovo.c
drivers/platform/x86/x86-android-tablets/other.c
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h