From patchwork Tue Apr 24 19:56:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 10360889 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA305601BE for ; Tue, 24 Apr 2018 19:56:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6E0428B76 for ; Tue, 24 Apr 2018 19:56:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AECF28C5B; Tue, 24 Apr 2018 19:56:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD1AE28B76 for ; Tue, 24 Apr 2018 19:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750841AbeDXT4U (ORCPT ); Tue, 24 Apr 2018 15:56:20 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:59969 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750778AbeDXT4T (ORCPT ); Tue, 24 Apr 2018 15:56:19 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7B14820F27; Tue, 24 Apr 2018 15:56:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 24 Apr 2018 15:56:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hmh.eng.br; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=FPFK5sjMbtDOCtMFL YREg5ESWpEIboKPy3yMRB+C4B8=; b=Va1SPZUvIKSKTkCClvftMrM3bHDCwCDaY +IvmrL7Z+dgfkqZs3nfXheoPAZNHyP3C4VoSiHRFm8/v99Xz8Nvf7ogSwN2VqyO/ wmdGPzoQ5kSoWqHbR69JsUvOlH8zYs6Xr+3I1YkbrUmQepSoO8Q4SLfW6+PQajQX 4DuR7PKDJTVeoTu1OYtzAw0UeQ/GjglG0dgC6oVJRGcCBDDkmpv+bgRdzBnugD8c pfxUdI745G4aJj6N8SZXxPaAjRfHRJ32i00ouXLldU2SZIIIxmIERMQvruRELK6D Hm5vI+aDIXMbFHOePGo4je5wNzJhwZq3QqePqLZMGKIeQLnoY6sAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=FPFK5sjMbtDOCtMFLYREg5ESWpEIboKPy3yMRB+C4B8=; b=TutFhCFq O9VIvHeNARd9+bFCXlTosBJHJe1Tq+bk+OHFtt419IdUrG9kVktWYJE4F0VggNbl o5H8iN3aYqQ84MIEnWIFGurDRQ/RCWkd+jsOxFGjGg+2L80pqcOdWTjSOitAh8o/ Mzm+Z2tJTqXoz6t94dSiq7rGdnbK0SxagFhSulnUv4XMczRYbgCBehuQ1t21TwK4 M8VLzVV+XvM6pee2ytedmKE8FhmIvMX+YdulIrGvVY7ddy3xwaP1k1EFtzifPfRo DceAC6Cn/My4U/gAIRvF3DZeDIBchiJUisr0MOYIZSVhaEhqgpnGpEoI/kt00UYt yPP4LhvuRaiZwA== X-ME-Sender: Received: from khazad-dum.debian.net (unknown [201.82.128.91]) by mail.messagingengine.com (Postfix) with ESMTPA id ADFC71025D; Tue, 24 Apr 2018 15:56:17 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id C2F7D3401314; Tue, 24 Apr 2018 16:56:15 -0300 (-03) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum2.khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bFiWCN0e8u8x; Tue, 24 Apr 2018 16:56:12 -0300 (-03) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id AA78C340043F; Tue, 24 Apr 2018 16:56:12 -0300 (-03) From: Henrique de Moraes Holschuh To: Platform Driver Cc: Henrique de Moraes Holschuh , Andy Shevchenko , Darren Hart , Christian Kellner , ibm-acpi-devel@lists.sourceforge.net, bberg@redhat.com, Golden_Miller83@protonmail.ch, FP1 Zhang Subject: [PATCH 1/3] thinkpad-acpi: silence HKEY 0x6032, 0x60f0, 0x6030 Date: Tue, 24 Apr 2018 16:56:03 -0300 Message-Id: <20180424195605.17526-1-hmh@hmh.eng.br> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Demote to debug level one existing thermal-control related event, and also add two new ones that would otherwise trigger unknown event warnings. These events are Windows-only for now. We do report them to userspace in case they become useful in the future. Signed-off-by: Henrique de Moraes Holschuh Reported-by: Jordan Glover Tested-by: Jordan Glover --- Documentation/laptops/thinkpad-acpi.txt | 2 ++ drivers/platform/x86/thinkpad_acpi.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt index 00b6dfed573c..6cced88de6da 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/laptops/thinkpad-acpi.txt @@ -540,8 +540,10 @@ Events that are propagated by the driver to userspace: 0x6021 ALARM: a sensor is too hot 0x6022 ALARM: a sensor is extremely hot 0x6030 System thermal table changed +0x6032 Thermal Control command set completion (DYTC, Windows) 0x6040 Nvidia Optimus/AC adapter related (TO BE VERIFIED) 0x60C0 X1 Yoga 2016, Tablet mode status changed +0x60F0 Thermal Transformation changed (GMTS, Windows) Battery nearly empty alarms are a last resort attempt to get the operating system to hibernate or shutdown cleanly (0x2313), or shutdown diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index da1ca4856ea1..cf25f0121d3b 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -212,7 +212,12 @@ enum tpacpi_hkey_event_t { TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */ TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */ TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */ - TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* thermal table changed */ + TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */ + TP_HKEY_EV_THM_CSM_COMPLETED = 0x6032, /* windows; thermal control set + * command completed. Related to + * AML DYTC */ + TP_HKEY_EV_THM_TRANSFM_CHANGED = 0x60F0, /* windows; thermal transformation + * changed. Related to AML GMTS */ /* AC-related events */ TP_HKEY_EV_AC_CHANGED = 0x6040, /* AC status changed */ @@ -4042,7 +4047,17 @@ static bool hotkey_notify_6xxx(const u32 hkey, switch (hkey) { case TP_HKEY_EV_THM_TABLE_CHANGED: - pr_info("EC reports that Thermal Table has changed\n"); + pr_debug("EC reports: Thermal Table has changed\n"); + /* recommended action: do nothing, we don't have + * Lenovo ATM information */ + return true; + case TP_HKEY_EV_THM_CSM_COMPLETED: + pr_debug("EC reports: Thermal Control Command set completed (DYTC)\n"); + /* recommended action: do nothing, we don't have + * Lenovo ATM information */ + return true; + case TP_HKEY_EV_THM_TRANSFM_CHANGED: + pr_debug("EC reports: Thermal Transformation changed (GMTS)\n"); /* recommended action: do nothing, we don't have * Lenovo ATM information */ return true;