From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D734C282CD for ; Mon, 28 Jan 2019 16:24:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52FCF2147A for ; Mon, 28 Jan 2019 16:24:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548692657; bh=sH53YEIHyS10Wu0pSjSlYMqSC7sEM7z9a9dPIqXtY+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=aMwRNEXop9lswhPNg3dE3842AhEYcLKYpRTtVZPBIpuMx1S4lDxEBhsgFT8bWUkW7 iyMgn17u05VvKufjPw4qHslbQ7R3ArCE2ILxAsFWaxqqMfyKgIK5DtBgzKTHPiKRKv 71It+qSvaZhXDFWQnHKXHqCiwjhKBuXgGF1nm+CA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389666AbfA1QYQ (ORCPT ); Mon, 28 Jan 2019 11:24:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:60774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389637AbfA1QYL (ORCPT ); Mon, 28 Jan 2019 11:24:11 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DB30521919; Mon, 28 Jan 2019 16:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548692650; bh=sH53YEIHyS10Wu0pSjSlYMqSC7sEM7z9a9dPIqXtY+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bYHm7c1dfLSRjG6orzjXZVNU3PVJxnQILa2eiJ1AqVretVwuxx5ColpzOD0pNlMbb ZnifdzK/Qt0jiLXMk8lACK9n6H5xo8ADxm5l978CkDOV/JYJGptE2jJj6VLEB8lbSs L8/L270ulYrWxj115yt3PWkEUeqDXgDX3SelT02k= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= , =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= , Andy Shevchenko , Sasha Levin , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Subject: [PATCH AUTOSEL 4.4 06/80] platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK Date: Mon, 28 Jan 2019 11:22:47 -0500 Message-Id: <20190128162401.58841-6-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128162401.58841-1-sashal@kernel.org> References: <20190128162401.58841-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: João Paulo Rechi Vita [ Upstream commit b3f2f3799a972d3863d0fdc2ab6287aef6ca631f ] 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 Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- 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 852d2de7f69f..2ee8d016fa5c 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -341,6 +341,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 */ -- 2.19.1