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=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 8BF64C282C4 for ; Mon, 4 Feb 2019 10:53:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44402217D6 for ; Mon, 4 Feb 2019 10:53:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549277599; bh=clv2+T9Qpf4kLiEiT+nwtJEV0zG9DRIDIVebIiiU1JI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cH20A+HZlzZ4kYe8VNoMfNvY80XZ22ngmuM7pBmjiAm/7qfauVhaMjCCSPNROuw0/ 7Cz8bmntLvhTF/ZvQT6qWHSuDu2KJbRlv5Q+JuP9SEHAw+7pQXp6SyQcHnbmYrNTjY qDFdK22gEXbNNDY7Dn8KET64r84xaSmxEZhpTzgI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732758AbfBDKxR (ORCPT ); Mon, 4 Feb 2019 05:53:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:50836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731517AbfBDKxP (ORCPT ); Mon, 4 Feb 2019 05:53:15 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 46E432070C; Mon, 4 Feb 2019 10:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549277594; bh=clv2+T9Qpf4kLiEiT+nwtJEV0zG9DRIDIVebIiiU1JI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VTsL3Pn6qWJRb+2+Bm/Ra/06cW/HYttuUbi67uaWkmgrpHnAIqzpMiAL6gJwX87Z9 X8iy7LS7NmrosoxSyteT0gJ3LEpOKZLEFAf5WAYQVGH62y2CS4PqhkSyMp71c6DfPM 9to+VLy3CSDRkrh4KhZ56VqTyNwB4XFdI77I6XHg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= , Andy Shevchenko , Sasha Levin Subject: [PATCH 4.20 64/80] platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK Date: Mon, 4 Feb 2019 11:37:24 +0100 Message-Id: <20190204103629.030616096@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190204103620.287366543@linuxfoundation.org> References: <20190204103620.287366543@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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(+) --- 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_wm { 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 */