mbox series

[0/3] ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper

Message ID 20230217145200.31821-1-hdegoede@redhat.com
Headers show
Series ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper | expand

Message

Hans de Goede Feb. 17, 2023, 2:51 p.m. UTC
Hi All,

x86 ACPI boards which ship with only Android as their factory image usually
have pretty broken ACPI tables, relying on everything being hardcoded in
the factory kernel image and often disabling parts of the ACPI enumeration
kernel code to avoid the broken tables causing issues.

Part of this broken ACPI code is that sometimes these boards have _AEI
ACPI GPIO event handlers which are broken.

So far this has been dealt with in the platform/x86/x86-android-tablets.c
module by it calling acpi_gpiochip_free_interrupts() on gpiochip-s with
troublesome handlers to disable the handlers.

But this is racy and sometimes too late. This series adds a new
acpi_quirk_skip_gpio_event_handlers() function to drivers/acpi/x86/utils.c
using the existing DMI table for this to avoid duplication of DMI matches.

Patch 2 adds a new x86 Android tablet model which needs the new
SKIP_GPIO_EVENT_HANDLERS quirk.

Patch 3 uses acpi_quirk_skip_gpio_event_handlers() in axp288_charger.c
to deal with there not being a ACPI event handler to disable charging
from Vbus before enable 5V boost output on the tablets micro-USB conn.

Sebastian (sre), since patch 3 depends on patch 1, it is probably
easiest to just merge the entire series through the linux-pm tree.
May we have your ack for this ?

Regards,

Hans


Hans de Goede (3):
  ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper
  ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750
  power: supply: axp288_charger: Use alt usb-id extcon on some x86
    android tablets

 drivers/acpi/x86/utils.c              | 34 ++++++++++++++++++++++++---
 drivers/gpio/gpiolib-acpi.c           |  3 +++
 drivers/power/supply/axp288_charger.c | 15 ++++++++++--
 include/acpi/acpi_bus.h               |  5 ++++
 4 files changed, 52 insertions(+), 5 deletions(-)