All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Huber <ulrich@huberulrich.de>
To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org
Cc: Ulrich Huber <ulrich@huberulrich.de>
Subject: [PATCH] ACPI: Add DMI quirk for Lenovo Yoga 9 (14INTL5)
Date: Tue, 24 Aug 2021 14:57:44 +0200	[thread overview]
Message-ID: <20210824125744.11125-1-ulrich@huberulrich.de> (raw)

The Lenovo Yoga 9 (14INTL5)'s ACPI _LID is bugged:

After hibernation the lid is initially reported as closed.
Once closing and then reopening the lid reports the lid as
open again. This leads to the conclusion that the initial
notification of the lid is missing but subsequent
notifications are correct.

In order fo the Linux LID code to handle this device properly
the lid_init_state must be set to ACPI_BUTTON_LID_INIT_OPEN.

Signed-off-by: Ulrich Huber <ulrich@huberulrich.de>
---
 drivers/acpi/button.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index f25bd336113b..1f9b9a4c38c7 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -77,6 +77,17 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
 		},
 		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED,
 	},
+	{
+		/*
+		 * Lenovo Yoga 9 14ITL5, initial notification of the LID device
+		 * never happens.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "82BG"),
+		},
+		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
+	},
 	{
 		/*
 		 * Medion Akoya E2215T, notification of the LID device only
-- 
2.33.0


             reply	other threads:[~2021-08-24 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 12:57 Ulrich Huber [this message]
2021-08-25 17:58 ` [PATCH] ACPI: Add DMI quirk for Lenovo Yoga 9 (14INTL5) 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=20210824125744.11125-1-ulrich@huberulrich.de \
    --to=ulrich@huberulrich.de \
    --cc=linux-acpi@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.