Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1238184pxu; Mon, 23 Nov 2020 15:36:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMdGIvxdaUsU+1i0zMxNyCgUDjNl8/4lTiDBZHpfBp0rJZLB9/gxzjH8QSMijWG4wKHbK7 X-Received: by 2002:a17:906:6947:: with SMTP id c7mr1861555ejs.533.1606174579198; Mon, 23 Nov 2020 15:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606174579; cv=none; d=google.com; s=arc-20160816; b=UBbO4c6OVSggfnLe2413kXwsBVvVfh/PlErkw9DvU8uXRm/hVE4Kf2t02CucqAHLwY DLG1crU69qL1v9vb1OLOjz2vIwc0eP9Tc33/6q68WKQHYK1FN+76ssFxUfofEk9YzwsG fdz70DfIvwu5IQXjoq8jsTne3ymrN6w7KPhWIn3t/SsFk9GKehTJxZEivFXajoDiv1gX 7N7VQGKctBuxG2wEL1zqFx7TF7MhVAWffI8sRpumEUpWGGY4dZm/Ed/5fxzczHFX7qCH Qokbm0Bv1ly7rxMmDzPl6RPG2UOp7D7VuRFbjy7hcVKl+dGg93izq2dStqGXArIwp2JT giCg== 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=OHnMvozW9pzRCF7Z6feG/nK/gyzKyCs1qxmQtIpgXEc=; b=QSw1+fFAu0bgJF1GYGwecVXXAqELqmd1DLEVpuSWnSeEUXabb93s3uTBogjb/KbdvQ IrJzXNRwIP8X8pV4Ch4+2m6q+svbeTNUEY8+PtMVHaVTctBm0X0FBG+HgOw/UlXpj3Ny ht3T38FgF87jEdjpWu8NOefJh4L4jx6chW67qEJfk5JOWKNJrp3KP5SBcYDL1GJBtqyZ hpiVhhI3687YYpx/uH933KQ3qSwE5Vv6SCMTBichfJ5Wn02cS1daTIAepfAmbRfeVVbR QFbyuigZvWzk3uYN+gvBWqa+Kv8//HZgR8kpgYIUrRP1P9F50e8v+Km8Q368LNjATKDJ BYwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h+bNgzxE; 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 f10si7708078edx.567.2020.11.23.15.35.57; Mon, 23 Nov 2020 15:36:19 -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=h+bNgzxE; 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 S1731546AbgKWMfc (ORCPT + 99 others); Mon, 23 Nov 2020 07:35:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:47166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731490AbgKWMfM (ORCPT ); Mon, 23 Nov 2020 07:35:12 -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 E567B20721; Mon, 23 Nov 2020 12:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134911; bh=ThyePWmfWXh0B2ZGeYNJ1P9kd2DwgM5TA8mdBLBk+xQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h+bNgzxEh360zQbAcdj+WOHhruur+eQ7M7FSkXTCpBgdTsLv18cBsZrj2aQ1FP268 iOqZNMPBrx+27qBVAzKwcHfJ+LFaZCte4r8jyfWhiPtyZmbV+ODlI3fcnpqYaiFd3J gTeu+205FhgnZI86oxAsQIntccoudyqVAwJAk/7k= 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 5.4 037/158] ACPI: button: Add DMI quirk for Medion Akoya E2228T Date: Mon, 23 Nov 2020 13:21:05 +0100 Message-Id: <20201123121821.728118932@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121819.943135899@linuxfoundation.org> References: <20201123121819.943135899@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 690bfe67e643d..ee7a7da276ddf 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -85,7 +85,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