linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-acpi@vger.kernel.org
Subject: [PATCH AUTOSEL 5.9 09/21] ACPI: button: Add DMI quirk for Medion Akoya E2228T
Date: Tue, 17 Nov 2020 07:56:40 -0500	[thread overview]
Message-ID: <20201117125652.599614-9-sashal@kernel.org> (raw)
In-Reply-To: <20201117125652.599614-1-sashal@kernel.org>

From: Hans de Goede <hdegoede@redhat.com>

[ Upstream commit 7daaa06357bf7f1874b62bb1ea9d66a51d4e567e ]

The Medion Akoya E2228T's ACPI _LID implementation is quite broken,
it has the same issues as the one from the Medion Akoya E2215T:

1. For notifications it uses an ActiveLow Edge GpioInt, rather then
   an ActiveBoth one, meaning that the device is only notified when the
   lid is closed, not when it is opened.

2. Matching with this its _LID method simply always returns 0 (closed)

In order for the Linux LID code to work properly with this implementation,
the lid_init_state selection needs to be set to ACPI_BUTTON_LID_INIT_OPEN,
add a DMI quirk for this.

While working on this I also found out that the MD60### part of the model
number differs per country/batch while all of the E2215T and E2228T models
have this issue, so also remove the " MD60198" part from the E2215T quirk.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/acpi/button.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index da4b125ab4c3e..088ec847fd26a 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -102,7 +102,18 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
 		 */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "E2215T MD60198"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "E2215T"),
+		},
+		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
+	},
+	{
+		/*
+		 * Medion Akoya E2228T, notification of the LID device only
+		 * happens on close, not on open and _LID always returns closed.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "E2228T"),
 		},
 		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
 	},
-- 
2.27.0


  parent reply	other threads:[~2020-11-17 12:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 12:56 [PATCH AUTOSEL 5.9 01/21] Revert "Revert "gpio: omap: Fix lost edge wake-up interrupts"" Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 02/21] tools, bpftool: Avoid array index warnings Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 03/21] habanalabs/gaudi: mask WDT error in QMAN Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 04/21] pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 05/21] scsi: ufs: Fix unbalanced scsi_block_reqs_cnt caused by ufshcd_hold() Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 06/21] scsi: ufs: Try to save power mode change and UIC cmd completion timeout Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 07/21] pinctrl: mcp23s08: Print error message when regmap init fails Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 08/21] selftests: kvm: Fix the segment descriptor layout to match the actual layout Sasha Levin
2020-11-17 12:56 ` Sasha Levin [this message]
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 10/21] arm64: errata: Fix handling of 1418040 with late CPU onlining Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 11/21] arm64: psci: Avoid printing in cpu_psci_cpu_die() Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 12/21] arm64: smp: Tell RCU about CPUs that fail to come online Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 13/21] lockdep: Avoid to modify chain keys in validate_chain() Sasha Levin
2020-11-18  1:26   ` Boqun Feng
2020-11-19  1:22     ` Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 14/21] um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb() Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 15/21] vfs: remove lockdep bogosity in __sb_start_write Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 16/21] gfs2: fix possible reference leak in gfs2_check_blk_type Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 17/21] hwmon: (pwm-fan) Fix RPM calculation Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 18/21] gfs2: Fix case in which ail writes are done to jdata holes Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 19/21] arm64: Add MIDR value for KRYO2XX gold/silver CPU cores Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 20/21] arm64: kpti: Add KRYO2XX gold/silver CPU cores to kpti safelist Sasha Levin
2020-11-17 12:56 ` [PATCH AUTOSEL 5.9 21/21] arm64: cpu_errata: Apply Erratum 845719 to KRYO2XX Silver Sasha Levin

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=20201117125652.599614-9-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).