From patchwork Fri Apr 20 15:16:27 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: 10352965 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 02A18602B1 for ; Fri, 20 Apr 2018 15:16:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5AA7287A7 for ; Fri, 20 Apr 2018 15:16:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7C83287A9; Fri, 20 Apr 2018 15:16:50 +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 D9312287A7 for ; Fri, 20 Apr 2018 15:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755351AbeDTPQt (ORCPT ); Fri, 20 Apr 2018 11:16:49 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38185 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755316AbeDTPQs (ORCPT ); Fri, 20 Apr 2018 11:16:48 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D669E21BD6; Fri, 20 Apr 2018 11:16:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 20 Apr 2018 11:16:47 -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=Zy0FJxmBMjByIVgCW tK42jVfGBCSXtlgStShOXq1msw=; b=TRM5yEDq0ciX7sLjbrwq8QrQzBxJrWgB1 8wWMWRrt430QC2ZEnzHT9qI4Kny8FHtXDuA+OERmamiChUHjX3XOHBxfufCBr6k9 2WlxdAkBSX6UIPcVez6KA6ohJN7hjgFzp8TM33S27zTa2T8/C/wkWQsKVwixWs8W 7PtV5mhkPc+ZdgQodCocLxKThBOTySbU3N9hxkX/HbBVB84B20vmkAP0uM/0y2vF InlO77MC6wtUuQePNoSA4MgTVYXj562qet2t1BcPzEeoPEnfFkVRfRTzt2V9IAoP Gxr+/aS0C10vnjl7ryaqHUJY/37D7/JTQ4ILbgbwgxzYo8IC+h2ng== 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=Zy0FJxmBMjByIVgCWtK42jVfGBCSXtlgStShOXq1msw=; b=LdDTtfeR VQjMAG2d7wFmeTabCiVG6U2Jhg7gskxkwxohtj3hwQgYQEVgLrjlLEBMq5d7tVMo Qlr9r9PmV0Ud+R2h7emtK1V+V3aiIVaoJ5Y7+sCKU7SrsFRgyR9vtVIWMDcBcyaj 8WOATpFPKESREzhcVNmC1orjF6vXxcBuXu1cLc+0wXSAJG5MXl4cvFcaFjm2H5D4 IUP3Cs9LlagwADqFCo8XPd4UmDqa64U+srK/KN9YAYrT6eWCTIhDdfzsVuczI820 RPnXjwNA9pfHN/DSjC60DcqFKdkvd2nB/sjJ71mNNeTyTGQjv2MJSzeLvNhGhWv+ VbXu68KZIvh6nA== X-ME-Sender: Received: from khazad-dum.debian.net (unknown [201.82.128.91]) by mail.messagingengine.com (Postfix) with ESMTPA id 29E03E4483; Fri, 20 Apr 2018 11:16:47 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 2C94C3401FE8; Fri, 20 Apr 2018 12:16:45 -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 WkXF51fVUo0h; Fri, 20 Apr 2018 12:16:41 -0300 (-03) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id D7F4A3401FE7; Fri, 20 Apr 2018 12:16:41 -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: [UNTESTED 1/3] thinkpad-acpi: silence HKEY 0x6032, 0x60f0, 0x6030 Date: Fri, 20 Apr 2018 12:16:27 -0300 Message-Id: <20180420151629.12993-1-hmh@hmh.eng.br> X-Mailer: git-send-email 2.11.0 In-Reply-To: <-B_kuLAsoL7HNLV_as9l197VeKXFOu7R-GfEj_oV2TRu40VHMh4SRkEpgaOEMhEqi5-t9Qdk4c8_vMNOXDk_QHuNj-EPKs2afxrL0zTBZxc=@protonmail.ch> References: <-B_kuLAsoL7HNLV_as9l197VeKXFOu7R-GfEj_oV2TRu40VHMh4SRkEpgaOEMhEqi5-t9Qdk4c8_vMNOXDk_QHuNj-EPKs2afxrL0zTBZxc=@protonmail.ch> 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 --- 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;