diff mbox series

[1/2] ACPI / x86: Add skip i2c clients quirk for Nextbook Ares 8A

Message ID 20230429103841.6988-1-hdegoede@redhat.com
State Accepted
Commit 69d6b37695c1f2320cfa330e1e1636d50dd5040a
Headers show
Series [1/2] ACPI / x86: Add skip i2c clients quirk for Nextbook Ares 8A | expand

Commit Message

Hans de Goede April 29, 2023, 10:38 a.m. UTC
The Nextbook Ares 8A is a x86 ACPI tablet which ships with Android x86
as factory OS. Its DSDT contains a bunch of I2C devices which are not
actually there (the Android x86 kernel fork ignores I2C devices described
in the DSDT).

On this specific model this just not cause resource conflicts, one of
the probe() calls for the non existing i2c_clients actually ends up
toggling a GPIO or executing a _PS3 after a failed probe which turns
the tablet off.

Add a ACPI_QUIRK_SKIP_I2C_CLIENTS for the Nextbook Ares 8 to the
acpi_quirk_skip_dmi_ids table to avoid the bogus i2c_clients and
to fix the tablet turning off during boot because of this.

Also add the "10EC5651" HID for the RealTek ALC5651 codec used
in this tablet to the list of HIDs for which not to skipi2c_client
instantiation, since the Intel SST sound driver relies on
the codec being instantiated through ACPI.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/x86/utils.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Rafael J. Wysocki May 17, 2023, 6:30 p.m. UTC | #1
On Sat, Apr 29, 2023 at 12:38 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> The Nextbook Ares 8A is a x86 ACPI tablet which ships with Android x86
> as factory OS. Its DSDT contains a bunch of I2C devices which are not
> actually there (the Android x86 kernel fork ignores I2C devices described
> in the DSDT).
>
> On this specific model this just not cause resource conflicts, one of
> the probe() calls for the non existing i2c_clients actually ends up
> toggling a GPIO or executing a _PS3 after a failed probe which turns
> the tablet off.
>
> Add a ACPI_QUIRK_SKIP_I2C_CLIENTS for the Nextbook Ares 8 to the
> acpi_quirk_skip_dmi_ids table to avoid the bogus i2c_clients and
> to fix the tablet turning off during boot because of this.
>
> Also add the "10EC5651" HID for the RealTek ALC5651 codec used
> in this tablet to the list of HIDs for which not to skipi2c_client
> instantiation, since the Intel SST sound driver relies on
> the codec being instantiated through ACPI.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/acpi/x86/utils.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> index 9c2d6f35f88a..4cfee2da0675 100644
> --- a/drivers/acpi/x86/utils.c
> +++ b/drivers/acpi/x86/utils.c
> @@ -365,7 +365,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
>                                         ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
>         },
>         {
> -               /* Nextbook Ares 8 */
> +               /* Nextbook Ares 8 (BYT version)*/
>                 .matches = {
>                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
>                         DMI_MATCH(DMI_PRODUCT_NAME, "M890BAP"),
> @@ -374,6 +374,16 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
>                                         ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
>                                         ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
>         },
> +       {
> +               /* Nextbook Ares 8A (CHT version)*/
> +               .matches = {
> +                       DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> +                       DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
> +                       DMI_MATCH(DMI_BIOS_VERSION, "M882"),
> +               },
> +               .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
> +                                       ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
> +       },
>         {
>                 /* Whitelabel (sold as various brands) TM800A550L */
>                 .matches = {
> @@ -392,6 +402,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
>  #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
>  static const struct acpi_device_id i2c_acpi_known_good_ids[] = {
>         { "10EC5640", 0 }, /* RealTek ALC5640 audio codec */
> +       { "10EC5651", 0 }, /* RealTek ALC5651 audio codec */
>         { "INT33F4", 0 },  /* X-Powers AXP288 PMIC */
>         { "INT33FD", 0 },  /* Intel Crystal Cove PMIC */
>         { "INT34D3", 0 },  /* Intel Whiskey Cove PMIC */
> --

Applied as 6.5 material along with the [2/2], thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index 9c2d6f35f88a..4cfee2da0675 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -365,7 +365,7 @@  static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
 					ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
 	},
 	{
-		/* Nextbook Ares 8 */
+		/* Nextbook Ares 8 (BYT version)*/
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "M890BAP"),
@@ -374,6 +374,16 @@  static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
 					ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
 					ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
 	},
+	{
+		/* Nextbook Ares 8A (CHT version)*/
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
+			DMI_MATCH(DMI_BIOS_VERSION, "M882"),
+		},
+		.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
+					ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
+	},
 	{
 		/* Whitelabel (sold as various brands) TM800A550L */
 		.matches = {
@@ -392,6 +402,7 @@  static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
 #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
 static const struct acpi_device_id i2c_acpi_known_good_ids[] = {
 	{ "10EC5640", 0 }, /* RealTek ALC5640 audio codec */
+	{ "10EC5651", 0 }, /* RealTek ALC5651 audio codec */
 	{ "INT33F4", 0 },  /* X-Powers AXP288 PMIC */
 	{ "INT33FD", 0 },  /* Intel Crystal Cove PMIC */
 	{ "INT34D3", 0 },  /* Intel Whiskey Cove PMIC */