Linux ACPI
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-acpi@vger.kernel.org
Subject: [PATCH v2 5/6] ACPI / button: Add DMI quirk for Asus T200TA
Date: Sat, 26 Oct 2019 22:24:35 +0200	[thread overview]
Message-ID: <20191026202436.311894-5-hdegoede@redhat.com> (raw)
In-Reply-To: <20191026202436.311894-1-hdegoede@redhat.com>

The Asus T200TA lid has some weird behavior where _LID keeps reporting
closed after every second openening of the lid. Causing immediate
re-suspend after opening every other open.

I've looked at the AML code but it involves talking to the EC and we
have no idea what the EC is doing. Setting lid_init_state to
ACPI_BUTTON_LID_INIT_OPEN fixes the unwanted behavior, so this commit
adds a DMI based quirk to use ACPI_BUTTON_LID_INIT_OPEN on the T200TA.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
- New patch in v2 of this series
---
 drivers/acpi/button.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index e4b2aa43265b..a090e9542d82 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -77,6 +77,18 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids);
 
 /* Please keep this list sorted alphabetically by vendor and model */
 static const struct dmi_system_id dmi_lid_quirks[] = {
+	{
+		/*
+		 * Asus T200TA, _LID keeps reporting closed after every second
+		 * openening of the lid. Causing immediate re-suspend after
+		 * opening every other open. Using LID_INIT_OPEN fixes this.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "T200TA"),
+		},
+		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
+	},
 	{
 		/* GP-electronic T701, _LID method points to a floating GPIO */
 		.matches = {
-- 
2.23.0


  parent reply	other threads:[~2019-10-26 20:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-26 20:24 [PATCH v2 1/6] ACPI / button: Refactor lid_init_state module parsing code Hans de Goede
2019-10-26 20:24 ` [PATCH v2 2/6] ACPI / button: Allow disabling LID support with the lid_init_state module option Hans de Goede
2019-10-26 20:24 ` [PATCH v2 3/6] ACPI / button: Turn lid_blacklst dmi table into a generic quirk table Hans de Goede
2019-10-26 20:24 ` [PATCH v2 4/6] ACPI / button: Add DMI quirk for Medion Akoya E2215T Hans de Goede
2019-10-26 20:24 ` Hans de Goede [this message]
2019-10-28 10:24   ` [PATCH v2 5/6] ACPI / button: Add DMI quirk for Asus T200TA Andy Shevchenko
2019-10-26 20:24 ` [PATCH v2 6/6] ACPI / button: Remove unused acpi_lid_notifier_[un]register functions Hans de Goede
2019-10-28 15:07 ` [PATCH v2 1/6] ACPI / button: Refactor lid_init_state module parsing code Rafael J. Wysocki

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=20191026202436.311894-5-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /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