From patchwork Thu Nov 1 00:21:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= X-Patchwork-Id: 10663435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2333D14E2 for ; Thu, 1 Nov 2018 00:22:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12D042BA7B for ; Thu, 1 Nov 2018 00:22:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 076BF2BB82; Thu, 1 Nov 2018 00:22:05 +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,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 9B7D32BA7B for ; Thu, 1 Nov 2018 00:22:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726266AbeKAJWT (ORCPT ); Thu, 1 Nov 2018 05:22:19 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:46320 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbeKAJWT (ORCPT ); Thu, 1 Nov 2018 05:22:19 -0400 Received: by mail-ed1-f65.google.com with SMTP id f8-v6so2832860edt.13; Wed, 31 Oct 2018 17:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=46/NOuoiPhhGNrGWXzwwHseMHtA5x0+HvtY23ixXS+s=; b=tf8az2Bx2CeDO02zJ1rCCAXLkt9edprsTLl8+mRmCqVZj6cb3JFualyjCzmXiJCr3b gr0znxUuMe9ifSfWm1IruZc5iIrns57Y3jbr4KDrBocs2QlvzVCyom7qo7pq+QNtKVtX AhwGz7GKSCb06ohW+FYJQM0vJNQwGjS7PjJvrE7+XEuAWzQCeK7ck7eit35hQ+GBAovO C7LS9EKFvBFUvrkOqLVb5BCn/WHmuearXlOq+QWuR6Xhas/fTTB5zC/EwubZseC5ylR0 BMOsuum/VqRvVpEx7KoLiYArT7giNrQB87L73sRM/W6COJyAcTlKjo/CWnGRoJc0g2Nh F/IA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=46/NOuoiPhhGNrGWXzwwHseMHtA5x0+HvtY23ixXS+s=; b=UgE79G6H507Ryq55RAk5hIRlXkexeXodtCMC2OQeYYDJVaGInsZ/fSsG7Yq3Pr+HCF QeAzZ4MVvR+5fDtQsT2sG0xnBsrrDiSpMMwhE3NTYCwFVSeZ4CTP31gL6DPjjMA/hTU3 /eDe++3z0BSxtPz8ATGD7dmyZrd2NYR8EU0yhUUy5DQWHxXpao1whNm3EZ/q4IyTWubR cv1tn0e5YrU1iWUg1D4+7rJuWKsUsTUN8foU5LaVkiy+uLMa+UAbUp3dI/nSM2bgsii3 i25JjQyvE8ZeNmGYFhX+g/qaLyF3BqDhjnbp02q+rA5IlMFJXxfL23giKPGxFHsGxGMf 7WkQ== X-Gm-Message-State: AGRZ1gIVD+reQOR049HDml0D84+5d2MTnUHNk9ucCjkzEVQkco5FHPqE Tp4h/6vuBqk8R90H6dbfxBI= X-Google-Smtp-Source: AJdET5d38Uv0WuXi6Bs2UZLPsgdsTja12I8JiubCuwwh+/A9fTZWhnvPZy4l8Fkj7VCb9E8SBcSJ/w== X-Received: by 2002:a17:906:2201:: with SMTP id s1-v6mr2812543ejs.31.1541031704495; Wed, 31 Oct 2018 17:21:44 -0700 (PDT) Received: from kiddo.lan ([2601:602:9400:bc9f::a3c]) by smtp.gmail.com with ESMTPSA id b9-v6sm2981468ejd.3.2018.10.31.17.21.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 17:21:43 -0700 (PDT) From: " =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= " X-Google-Original-From: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= To: Corentin Chary , Darren Hart , Andy Shevchenko , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Cc: hadess@hadess.net, Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessm.com, =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= Subject: [PATCH 1/3] asus-wmi: Tell the EC the OS will handle the display off hotkey Date: Wed, 31 Oct 2018 17:21:26 -0700 Message-Id: <20181101002128.28884-2-jprvita@endlessm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101002128.28884-1-jprvita@endlessm.com> References: <20181101002128.28884-1-jprvita@endlessm.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the past, Asus firmwares would change the panel backlight directly through the EC when the display off hotkey (Fn+F7) was pressed, and only notify the OS of such change, with 0x33 when the LCD was ON and 0x34 when the LCD was OFF. These are currently mapped to KEY_DISPLAYTOGGLE and KEY_DISPLAY_OFF, respectively. Most recently the EC on Asus most machines lost ability to toggle the LCD backlight directly, but unless the OS informs the firmware it is going to handle the display toggle hotkey events, the firmware still tries change the brightness through the EC, to no effect. The end result is a long list (at Endless we counted 11) of Asus laptop models where the display toggle hotkey does not perform any action. Our firmware engineers contacts at Asus were surprised that there were still machines out there with the old behavior. Calling WMNB(ASUS_WMI_DEVID_BACKLIGHT==0x00050011, 2) on the _WDG device tells the firmware that it should let the OS handle the display toggle event, in which case it will simply notify the OS of a key press with 0x35, as shown by the DSDT excerpts bellow. Scope (_SB) { (...) Device (ATKD) { (...) Name (_WDG, Buffer (0x28) { /* 0000 */ 0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11, /* 0008 */ 0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66, /* 0010 */ 0x4E, 0x42, 0x01, 0x02, 0x35, 0xBB, 0x3C, 0x0B, /* 0018 */ 0xC2, 0xE3, 0xED, 0x45, 0x91, 0xC2, 0x4C, 0x5A, /* 0020 */ 0x6D, 0x19, 0x5D, 0x1C, 0xFF, 0x00, 0x01, 0x08 }) Method (WMNB, 3, Serialized) { CreateDWordField (Arg2, Zero, IIA0) CreateDWordField (Arg2, 0x04, IIA1) Local0 = (Arg1 & 0xFFFFFFFF) (...) If ((Local0 == 0x53564544)) { (...) If ((IIA0 == 0x00050011)) { If ((IIA1 == 0x02)) { ^^PCI0.SBRG.EC0.SPIN (0x72, One) ^^PCI0.SBRG.EC0.BLCT = One } Return (One) } } (...) } (...) } (...) } (...) Scope (_SB.PCI0.SBRG.EC0) { (...) Name (BLCT, Zero) (...) Method (_Q10, 0, NotSerialized) // _Qxx: EC Query { If ((BLCT == Zero)) { Local0 = One Local0 = RPIN (0x72) Local0 ^= One SPIN (0x72, Local0) If (ATKP) { Local0 = (0x34 - Local0) ^^^^ATKD.IANE (Local0) } } ElseIf ((BLCT == One)) { If (ATKP) { ^^^^ATKD.IANE (0x35) } } } (...) } Signed-off-by: João Paulo Rechi Vita --- drivers/platform/x86/asus-wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index b52b192a4f16..c25b946bb602 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -2150,7 +2150,8 @@ static int asus_wmi_add(struct platform_device *pdev) err = asus_wmi_backlight_init(asus); if (err && err != -ENODEV) goto fail_backlight; - } + } else + err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL); status = wmi_install_notify_handler(asus->driver->event_guid, asus_wmi_notify, asus); From patchwork Thu Nov 1 00:21:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= X-Patchwork-Id: 10663427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 930733CF1 for ; Thu, 1 Nov 2018 00:21:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 826822BA7B for ; Thu, 1 Nov 2018 00:21:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 769732BB8F; Thu, 1 Nov 2018 00:21:53 +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,FREEMAIL_FROM,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 22D792BB79 for ; Thu, 1 Nov 2018 00:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725946AbeKAJWX (ORCPT ); Thu, 1 Nov 2018 05:22:23 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45654 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbeKAJWX (ORCPT ); Thu, 1 Nov 2018 05:22:23 -0400 Received: by mail-ed1-f68.google.com with SMTP id t10-v6so15172367eds.12; Wed, 31 Oct 2018 17:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xZDOdUT+8hHwxZCwsWNH62GriDD+REO2XNb3X0hnxVE=; b=hCEzKzJQfivxHWA8rXMgjQu+KDXRqurrPtH4ZjvjwIqnv9eOEZQDqiPos0T8UDhEXW cLEMXevNJdXt6yHdr9v0OEy8IAwa41SlhbOBTLBGRkSbklcX4lgzc2X1jfRfO7TmXkUY fIRd3YdHG/dEt3q0tDWV+M8g5HlzscALE/LTsI3kIZL5HuRxzQJO1N8hzpMdQAxsFyCg kbj8TVcsc8RUFLBTOxApLN7d0Eud81LwBpMrm8JVdC4ptHb8cVFxrQYsnQuBsWUuf2Pz vm7KLQLefKAbkLbgDWiJSC5OPirKHs1Ok5iRVXQj3sGm8zzXeN/Pc6fSLAgxirQa7OE6 FeKA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xZDOdUT+8hHwxZCwsWNH62GriDD+REO2XNb3X0hnxVE=; b=ifwLgjficualq3TQVjqhjXV6ki1l6UayNEtiKo4ZjkhYgXiUFwgnXYao3GXlYPTgcL HMZwaRDClSaLWYq+nzMJutMGGRSo0lbRuDXLaV668HDcWP2/HfDr6ETK8ufhg8X5Myq9 H8nFBbZAfq9QFauAq2VXWlP6SHzbKVeXlroVm/gEMFH0sIpEVw0vt4vNYLXj2cjcdeQq TgoVwqgWiv0xf4WKH/5Cvr4WEYN74Ar059SY7PIVmm6TUHlEOjw/L/KwASHRjoURvD6t zQvRuW1cjQbl/Cp++nfI+NJSDFujiYWUY7DTwbx7rxWprV2I/oz/IOKCS3rq2Q+QKlIY j8GQ== X-Gm-Message-State: AGRZ1gJvN0z47ORAy0Q9x3DJWMr1I+mxqOVbq85idpY98Ccdt1+DIJJH 4Vb1dUqqSIR0J03gV09RNkQ= X-Google-Smtp-Source: AJdET5fDIOj+Xd2KyTMTD9AhuY4yXJXC7RCrRqr+Lv6kr1P0U80M7m1dD5/a4PBhjUdm2e3xtjtI/A== X-Received: by 2002:a50:aefd:: with SMTP id f58-v6mr3707837edd.42.1541031709188; Wed, 31 Oct 2018 17:21:49 -0700 (PDT) Received: from kiddo.lan ([2601:602:9400:bc9f::a3c]) by smtp.gmail.com with ESMTPSA id b9-v6sm2981468ejd.3.2018.10.31.17.21.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 17:21:48 -0700 (PDT) From: " =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= " X-Google-Original-From: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= To: Corentin Chary , Darren Hart , Andy Shevchenko , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Cc: hadess@hadess.net, Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessm.com, =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= Subject: [PATCH 2/3] asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK Date: Wed, 31 Oct 2018 17:21:27 -0700 Message-Id: <20181101002128.28884-3-jprvita@endlessm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101002128.28884-1-jprvita@endlessm.com> References: <20181101002128.28884-1-jprvita@endlessm.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the OS registers to handle events from the display off hotkey the EC will send a notification with 0x35 for every key press, independent of the backlight state. The behavior of this key on Windows, with the ATKACPI driver from Asus installed, is turning off the backlight of all connected displays with a fading effect, and any cursor input or key press turning the backlight back on. The key press or cursor input that wakes up the display is also passed through to the application under the cursor or under focus. The key that matches this behavior the closest is KEY_SCREENLOCK. Signed-off-by: João Paulo Rechi Vita --- drivers/platform/x86/asus-nb-wmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index db2af09067db..5a00a7665f9b 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -444,6 +444,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, 0x32, { KEY_MUTE } }, { KE_KEY, 0x33, { KEY_DISPLAYTOGGLE } }, /* LCD on */ { KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */ + { KE_KEY, 0x35, { KEY_SCREENLOCK } }, { KE_KEY, 0x40, { KEY_PREVIOUSSONG } }, { KE_KEY, 0x41, { KEY_NEXTSONG } }, { KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */ From patchwork Thu Nov 1 00:21:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= X-Patchwork-Id: 10663431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 925D814BD for ; Thu, 1 Nov 2018 00:21:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80AD62BB79 for ; Thu, 1 Nov 2018 00:21:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 745F42BB8E; Thu, 1 Nov 2018 00:21:58 +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,FREEMAIL_FROM,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 08ACF2BB82 for ; Thu, 1 Nov 2018 00:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727386AbeKAJW2 (ORCPT ); Thu, 1 Nov 2018 05:22:28 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:44714 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbeKAJW2 (ORCPT ); Thu, 1 Nov 2018 05:22:28 -0400 Received: by mail-ed1-f68.google.com with SMTP id n19-v6so4209408edq.11; Wed, 31 Oct 2018 17:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p9wez5ygq9emTYIvZbgpHGnwoRGbsHaraoBem95C3dc=; b=YnAd/sfUs8fbb+9oyjUQNjMksteFBYqxHkq9llwW3RgXyOrPJZx1Hx1s6M60KRwq57 2L0kyvpAidazs0VLCV+0CFKhf1LytfeVsM374Qes1MFYPSbUaK8wF2LbagoDhpoP32Z6 r202m2ZiQuUCfUXu3quYnfJcOTRD9XX2YXoL4XXltgJRZrW2kLxJUGW1PMA32pIovmgl qdrhgDgI+HC67kLFZnQdo/S8ra8WK5jLC6/DYghub0XqdC1su5TeNjLRC1FOUNQRP+nP +ftL44sHAzIstEtpQEa/PZuIaIi/Nc4M/DCZicTATjlMEhAwj/Gcoaf+wZq8IYX1B6nS 2iVw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=p9wez5ygq9emTYIvZbgpHGnwoRGbsHaraoBem95C3dc=; b=GUR24ONIf8lJdQZwptCOTKImxounD7fW4L2lZA7/YDA8fask8tR+2UQZaILyVZgt9j t0zopt181usNn478srEs1TUp7qQSB/J0TrjY4EdgHVfs+/BRTrpJrEvt6dOYZWz33PW5 C7BdbCwSeeumqhxp0qoJmQ3x9ooRG6YP8MooCpO8saj90l7/Tq2GgvQ4+hsY/ThtfZbA HCdn4niFgP1wb2Sj5elFiph0HbwBxZo6bXiHeaC1UEw5GvM2YmZQO79bNRXf78xz5ufd JtlGyfJuoAeofub4xrJpZYzYpYYlsHPnoD/mtuul8SRf6htaXgP2JqPfNhlU41GSaSxy 8/lg== X-Gm-Message-State: AGRZ1gICi4EP0TwWW6c5JNvbrUWSFPDyRd8DjaFEF7TXWAAU2D7imqWd ixAdx0hBIlz7uyd4zHH789Q= X-Google-Smtp-Source: AJdET5emHYts92bH7InW/swN413q/3E97D3tImftf+Kxnb55KPCDMbn6Gsjf+kR7h9xm7Mhqk1pUfQ== X-Received: by 2002:a50:a974:: with SMTP id m49-v6mr143648edc.169.1541031714036; Wed, 31 Oct 2018 17:21:54 -0700 (PDT) Received: from kiddo.lan ([2601:602:9400:bc9f::a3c]) by smtp.gmail.com with ESMTPSA id b9-v6sm2981468ejd.3.2018.10.31.17.21.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 17:21:53 -0700 (PDT) From: " =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= " X-Google-Original-From: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= To: Corentin Chary , Darren Hart , Andy Shevchenko , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Cc: hadess@hadess.net, Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessm.com, =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= Subject: [PATCH 3/3] asus-nb-wmi: Drop mapping of 0x33 and 0x34 scan codes Date: Wed, 31 Oct 2018 17:21:28 -0700 Message-Id: <20181101002128.28884-4-jprvita@endlessm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101002128.28884-1-jprvita@endlessm.com> References: <20181101002128.28884-1-jprvita@endlessm.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to Asus firmware engineers, the meaning of these codes is only to notify the OS that the screen brightness has been turned on/off by the EC. This does not match the meaning of KEY_DISPLAYTOGGLE / KEY_DISPLAY_OFF, where userspace is expected to change the display brightness. Signed-off-by: João Paulo Rechi Vita --- drivers/platform/x86/asus-nb-wmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index 5a00a7665f9b..b6f2ff95c3ed 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -442,8 +442,6 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, 0x30, { KEY_VOLUMEUP } }, { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, { KE_KEY, 0x32, { KEY_MUTE } }, - { KE_KEY, 0x33, { KEY_DISPLAYTOGGLE } }, /* LCD on */ - { KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */ { KE_KEY, 0x35, { KEY_SCREENLOCK } }, { KE_KEY, 0x40, { KEY_PREVIOUSSONG } }, { KE_KEY, 0x41, { KEY_NEXTSONG } },