Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3712042imu; Mon, 28 Jan 2019 09:27:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN7E4IiQ1aZNxpsNvfdLMTy/WORxfrrJE91PBdmO0MjzsWiVies8l5+U1eBXj9PWs/S0hIR0 X-Received: by 2002:a17:902:6e0f:: with SMTP id u15mr22312128plk.175.1548696454143; Mon, 28 Jan 2019 09:27:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696454; cv=none; d=google.com; s=arc-20160816; b=dC3zBnQSP/2YS8eknSk3rFJ3CGgHLuNkvIo0AQiN78ojmqWUp23+PK9yeZguTVkMnJ fupc6n/QqEYyNPxvPjx3G+hE0byqN6fpuzxPRmYIVFBMSoZD/69emWKwcG+wgScKrIYo 6FT8DMpAAG2AY74R99CxPH1ZD1+yBdhGyd2tVXmVYOblMdEorQcT1tmOx76PJNoVHCS+ YXCPyJvh4EWsThMp62McJX+DgH/++aaDtuMSzVsDgwTxqKmHrzT/7hWmhfihaa4yMmWW 6RUqljAd4g93ttiRB4BGwbRTsoVnDvcwZgF5uI964xE0LMivL2mLtH9WlvMlPmgMrPPl rD1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SXkt4wczvUjhTLWbOaCcGdRPJi2zswhbZuVZbu5zyHU=; b=tDR6z4bgajr83hUSBlrMRoWppyEtEa+jD5URXWibbWoZsHD+aMxQFELeAsKo8w9hDr phONaiCxvTdnzuktf1lqVp+MRAPO52C9FJeAuJ52PtjtgUsxcUSoHBB3x/z55KXmiaBG 1DCT+WjBbvqsPqu7dSlXZ4PjL7cWDiQ3iqBW9obDtAgyEPaZDPTTIqFezgPSdmXhBGnL gtq9iFtbAIATBBZGQxoiQ4cQ2oGz7D2aBmk2Gw1khJkuqPHKbCuhZ0yBWX1UmoKaTDz4 MuH2PlPQyGV5NQdnLvZjkmh0Jco1yQ736Dl3YRwwM7Yd5t0O6VYtVHPZQTWcn5vPqQVL toSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wWX9dAof; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si33755071plt.68.2019.01.28.09.27.18; Mon, 28 Jan 2019 09:27:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wWX9dAof; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730750AbfA1QAR (ORCPT + 99 others); Mon, 28 Jan 2019 11:00:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:45548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730742AbfA1QAP (ORCPT ); Mon, 28 Jan 2019 11:00:15 -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 369152082E; Mon, 28 Jan 2019 16:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691215; bh=PBwiyGYX+rPDMsRuT34Wi4OA+PQc4NSmjZki/sCXrvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wWX9dAof3BgjMtbt4DnPjwFKNEqsrycwUCu8CXJ2JlJ9hDW2t7oUeTgUW/PrXL0Et S4uorDwqT7sNL/8Gz/EF/3ACFRSXOi9RcZPJA1Vmqps9bkQwEkHGOOB2nHnMWhmtnd wtVta6h4bPRrDb+LI8Jclw8AQJslxruhXC53iIuA= 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.19 018/258] platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK Date: Mon, 28 Jan 2019 10:55:24 -0500 Message-Id: <20190128155924.51521-18-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-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 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 */ -- 2.19.1