From: Andy Shevchenko <andy@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/3] ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper
Date: Mon, 20 Feb 2023 15:34:55 +0200 [thread overview]
Message-ID: <Y/N2/+UgH6MRUSOr@smile.fi.intel.com> (raw)
In-Reply-To: <20230218103235.6934-2-hdegoede@redhat.com>
On Sat, Feb 18, 2023 at 11:32:33AM +0100, Hans de Goede wrote:
> 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, which contains various workarounds for these devices, by it calling
> acpi_gpiochip_free_interrupts() on gpiochip-s with troublesome handlers to
> disable the handlers.
>
> But in some cases this is too late, if the handlers are of the edge type
> then gpiolib-acpi.c's code will already have run them at boot.
> This can cause issues such as GPIOs ending up as owned by "ACPI:OpRegion",
> making them unavailable for drivers which actually need them.
>
> Boards with these broken ACPI tables are already listed in
> drivers/acpi/x86/utils.c for e.g. acpi_quirk_skip_i2c_client_enumeration().
> Extend the quirks mechanism for a new acpi_quirk_skip_gpio_event_handlers()
> helper, this re-uses the DMI-ids rather then having to duplicate the same
> DMI table in gpiolib-acpi.c .
>
> Also add the new ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS quirk to existing
> boards with troublesome ACPI gpio event handlers, so that the current
> acpi_gpiochip_free_interrupts() hack can be removed from
> x86-android-tablets.c .
I'm wondering if we can teach acpi_gpio_in_ignore_list() to handle this.
P.S. Why do we lock an IRQ before checking acpi_gpio_in_ignore_list() and
why do we not free that if the IRQ is in ignore list?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-02-20 13:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 10:32 [PATCH 0/3] ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper Hans de Goede
2023-02-18 10:32 ` [PATCH 1/3] " Hans de Goede
2023-02-20 13:34 ` Andy Shevchenko [this message]
2023-02-20 15:23 ` Hans de Goede
2023-02-20 15:35 ` Andy Shevchenko
2023-02-20 15:51 ` Hans de Goede
2023-02-18 10:32 ` [PATCH 2/3] ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750 Hans de Goede
2023-02-18 10:32 ` [PATCH 3/3] power: supply: axp288_charger: Use alt usb-id extcon on some x86 android tablets Hans de Goede
-- strict thread matches above, loose matches on Subject: below --
2023-02-17 14:51 [PATCH 0/3] ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper Hans de Goede
2023-02-17 14:51 ` [PATCH 1/3] " Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y/N2/+UgH6MRUSOr@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox