Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1237272pxu; Mon, 23 Nov 2020 15:34:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9G3mh/VrQlXRD7j/kNDKIL1IVgcJ/sx9aoGsFoMN0lwJcII4wgVOgnjATqsi3FwPjhOu0 X-Received: by 2002:a50:9fc1:: with SMTP id c59mr1428138edf.59.1606174493609; Mon, 23 Nov 2020 15:34:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606174493; cv=none; d=google.com; s=arc-20160816; b=0W+lxvaCZlXGMkSBpkr23nHmLyeaQ7MhARI+LN5GGCnxg3gGAgfYFiO0mi1sh/pSPl 5PK545nc9rtNYIrUVeKKddq9SrK4ivQkJbQQ0Qt3mWbqTJptQpSHXqQG5Il4lPHR2Lvi SRntmuZKEkgBeAoTIerwYNjnsnXzEw40Sb2JbfMQUSygs1jp9h/ZUaK9LTZkwUgQX512 DV7OztJF0EAGVrlXBfrPF2sIcemWWG+FTHz1AxVGlY1n60TydjKLiUAnSKtwyOpmMFJO 4/LlrgExz7cVnVjoGgcpdVRn2Y3fyhac7gJNWEpV1AiOwwckPlli6s0OnIHxF5KtX4Gu CJCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gwP4820yGe0Dg7SpLq013m3Oa4f63b6c6elkoQUZi/M=; b=HlW9zHa9fI/IJzgeLfQ3AT5aRO6BYydvi73Gk1wEEErq/p5zoyBiQiHfm9Ct7Or6D9 8wL/uRMq5RtG0RApel0vEAirx/ipo747xhRQuhDv+1yExmVElAMEf6hdCyeagLFv8zH4 Nvr7it9PzumbQxb6WA0l1eji5HyNwPXr64I0vqL53yEaejJEDQHqBo04PHwhGnEdCrA0 p90UxztYCSMaD7JTJaxDd5rc3Ea1WxMv8vVUrg/SMlGcpNAIP+miy4sgvQyIhgq/vdzH gLKxMY/fVLqTynFVCJR4romGltmqtB0eqGNn9ExBIE8t/cVYS7bmcikCoATF3j/P7VTE fI2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QETfh0gn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si7119221ejw.322.2020.11.23.15.34.31; Mon, 23 Nov 2020 15:34:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QETfh0gn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730686AbgKWMap (ORCPT + 99 others); Mon, 23 Nov 2020 07:30:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:41648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730667AbgKWMal (ORCPT ); Mon, 23 Nov 2020 07:30:41 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 654B92100A; Mon, 23 Nov 2020 12:30:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134640; bh=YPGXcz0KA9IeQcBH7kA4FbLI+Tgioj/jCy3QwAFE7Xc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QETfh0gnWfFMakQDSoXJ5HpfnyavCcT2ZOXiVi3hV75lg1n2ttfplSwncPjR3eeIP HoJRkE11hEoipU+j5hg7epPUJ0y5JtIp/ZdsnFVc/Lak17DJprR/oufQttYmw1jppO XbLNwk/I5KfqIbAxckZEGLcHUjlbPdRebVAKiUQU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.19 30/91] ACPI: button: Add DMI quirk for Medion Akoya E2228T Date: Mon, 23 Nov 2020 13:21:50 +0100 Message-Id: <20201123121810.792749689@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121809.285416732@linuxfoundation.org> References: <20201123121809.285416732@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ 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 Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- 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 f43f5adc21b61..abf101451c929 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -98,7 +98,18 @@ static const struct dmi_system_id lid_blacklst[] = { */ .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