From patchwork Fri Jan 12 11:04:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 10160221 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 78DB2602A7 for ; Fri, 12 Jan 2018 11:08:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61949287FF for ; Fri, 12 Jan 2018 11:08:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53DB628852; Fri, 12 Jan 2018 11:08: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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 A7013287FF for ; Fri, 12 Jan 2018 11:08:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933180AbeALLIt (ORCPT ); Fri, 12 Jan 2018 06:08:49 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:46280 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932740AbeALLIs (ORCPT ); Fri, 12 Jan 2018 06:08:48 -0500 Received: by mail-wm0-f68.google.com with SMTP id 143so11217013wma.5; Fri, 12 Jan 2018 03:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=gak+bQFT3vMymfeq6bsjeEXfbvWqqSHrGheUZuQsaec=; b=gwQ7QuwxI0aGEKjITIWQUIkUY5B0E5Q8WogNMzdBCiQ46FGiSIkMIutpUN7cH3fJtL oKPOIgvCmZiRJywa4GGWZ1NcEU2ps6NQuIt6QPkr+dN3Rrhjf+mhcXgGxegNJfEuEHG5 FdHZqjzV/q+fnyRGIbLGP2lWN8vb7khp2xDLP51b+7xsoUJiHVGkCeS/YxXkhwHDykhV 9hK0w+bqp5SoI1PAv39/DOzSZ8JiD4y06owpCMmz1vH52XN0yYtZx04FOFVdlCt4Jbol vrBIuHdOtmNhbFSi5YMwpKFpHQ2b/IAzu1j9PJAkmh/i3n6+B3jokGsg6dIG+lP4U0A4 NSdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gak+bQFT3vMymfeq6bsjeEXfbvWqqSHrGheUZuQsaec=; b=oVCC6oJA/I1TzeqvMbKHY8UTpSBplupDZKBbcuJa3G/J33r9ErtBDpDLNDMhw607dC mLoW7baTXnR0J/VBf5uTfi+DFCakGdT8rD+jodp6gCVUgCg0QrhVEt0XImGkCfbvCvAB Aw/mSEumTbW+C6Wd/3Wr98Ls0HCdvK3nohFRtegx9SUG8pa2+9i4qjFfqAtqETDKAAzY FbYFsIgz4+YzjE8tCqQdGnKxI6CWKZxvLAgab2RRHM7tbKapTf6FEv+Qt2WnA0JrhaFB kzYqoTKMwnhJitqTibp2axiusNKFc+qNgyfO/ul4QNaFJMk3n5FPyLHyr6R0LIh8RcJN 7B3A== X-Gm-Message-State: AKwxytdnmzynlsrTT3Eyfd35HCJXH75XgVCQ3y/dbWBqytkjMh1RtoU8 dbc2/RBYmiTdT1PRg52Ogq6D9Q== X-Google-Smtp-Source: ACJfBouOgJXdjyAp4qC5LBoZ/U/ybzodvsoaFugfQwUkqw5ieamgDPP9jBnR7b05Kb3EhSg55/XDPg== X-Received: by 10.28.133.148 with SMTP id h142mr3369571wmd.110.1515755324189; Fri, 12 Jan 2018 03:08:44 -0800 (PST) Received: from david-x1.fritz.box (p200300C2A3F104002AF3A0F30ADE9C1C.dip0.t-ipconnect.de. [2003:c2:a3f1:400:2af3:a0f3:ade:9c1c]) by smtp.gmail.com with ESMTPSA id p15sm2279174wre.47.2018.01.12.03.08.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jan 2018 03:08:43 -0800 (PST) From: David Herrmann To: Platform Driver Cc: Henrique de Moraes Holschuh , Andy Shevchenko , Darren Hart , linux-kernel@vger.kernel.org, David Herrmann , Matthew Thode Subject: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection Date: Fri, 12 Jan 2018 12:04:45 +0100 Message-Id: <20180112110445.1876-1-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.15.1 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 This patch prevents the thinkpad_acpi driver from warning about 2 event codes returned for keyboard palm-detection. No behavioral changes, other than suppressing the warning in the kernel log. The events are still forwarded via acpi-netlink channels. We could, optionally, decide to forward the event through a input-switch on the tpacpi input device. However, so far no suitable input-code exists, and no similar drivers report such events. Hence, leave it an acpi event for now. Note that the event-codes are named based on empirical studies. On the ThinkPad X1 5th Gen the sensor can be found underneath the arrow key. Cc: Matthew Thode Signed-off-by: David Herrmann Acked-by: Henrique de Moraes Holschuh --- drivers/platform/x86/thinkpad_acpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 117be48ff4de..128f91af716e 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -214,6 +214,10 @@ enum tpacpi_hkey_event_t { /* AC-related events */ TP_HKEY_EV_AC_CHANGED = 0x6040, /* AC status changed */ + /* Further user-interface events */ + TP_HKEY_EV_PALM_DETECTED = 0x60b0, /* palm hoveres keyboard */ + TP_HKEY_EV_PALM_UNDETECTED = 0x60b1, /* palm removed */ + /* Misc */ TP_HKEY_EV_RFKILL_CHANGED = 0x7000, /* rfkill switch changed */ }; @@ -4079,6 +4083,12 @@ static bool hotkey_notify_6xxx(const u32 hkey, *send_acpi_ev = false; break; + case TP_HKEY_EV_PALM_DETECTED: + case TP_HKEY_EV_PALM_UNDETECTED: + /* palm detected hovering the keyboard, forward to user-space + * via netlink for consumption */ + return true; + default: pr_warn("unknown possible thermal alarm or keyboard event received\n"); known = false;