Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2432855rdh; Sun, 29 Oct 2023 16:29:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZMX2ZZRjvsdyksYYGoI9PUb59gP4Vv8matNY14vVfIOEUJsPvsRD9ezd0mWbFMkWU9ySW X-Received: by 2002:a05:6870:9d0c:b0:1ea:9898:c07f with SMTP id pp12-20020a0568709d0c00b001ea9898c07fmr10890026oab.22.1698622166891; Sun, 29 Oct 2023 16:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698622166; cv=none; d=google.com; s=arc-20160816; b=H6Km/NVj6uVoLV8xkfOi/IsEA0q+Qqv6plVsHpRV7trvOMzrdN5+86P4JskP9JJP+A CIHyQX87Nt2iZOAixwvdtSUKZyCENE0FNGZc+hHie405SqmiVQxFWpoYTwMq22H0HYZR w8HCkipbIZt5jybHItJXLhTaNWp3EFW/+6LSHceXFBCvqWowu+Uk8TKUDIwQVyrGu2lK hQt+PR3bsW6kx5vNLx8PKRbTivdkx6vOn51+3CmKv0es3F3Uh+aHkHNZtsw/Js3Kkbpy NN611NO7mdLztqpkesT1uX9wNckSzvlyWV+Yh5ni3mCyphK/Y93P/byFtNSGS/fpTNk8 np4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VZsrr6M5tVyC2+xjFNs6m+4soGfcN0qCyMMOcxfSR4U=; fh=P5AezjGKw5V9vt/x3HRTSi2wTIEMbVUSMoyHltlzidg=; b=vBmLdd5UUlhtAo7ysPuHVpxZVSAsehcjfE8p7RUlT6L/1zXTAh7gQzBavyuG9Ovb5Y yLYP/KhlJF0JWJVQ5J7xcOtyD8t2+YIg1MAoLI2AJmpSHZvvQx3F0WKkkzg0vbFfTuGn DJsxZpvct/8hBPISA2tttXccjVp3fD0j1im9TXwNDp2lOyzX07/ZsVOJ6sUtKxwX9oK+ OvzEzfM/dPTPHnou5IqLpEwLvUUwLVUDH17STaXGSAvldtsDx8IZP7zLvns1C1XGKv9X 2PBTH7sB+4zHaoTz9HXxnZon0Cq0+jtPO0iCsqWR0W+rujNt6IsJOfAD61pf2MtyL+5x Z6/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EfAgQXTl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z19-20020a63e113000000b005b96dd10899si2103442pgh.852.2023.10.29.16.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 16:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EfAgQXTl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BE59680A308E; Sun, 29 Oct 2023 16:29:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231965AbjJ2X2t (ORCPT + 99 others); Sun, 29 Oct 2023 19:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232518AbjJ2X21 (ORCPT ); Sun, 29 Oct 2023 19:28:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 422243AA4; Sun, 29 Oct 2023 15:57:46 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B907FC43397; Sun, 29 Oct 2023 22:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698620213; bh=JswOhBccnJVHYL3Ugue3yIYUuKXzrFLIxu2iPaihh8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EfAgQXTlgtvuCceC2zoMnzDeqRZ2/uG14/00i6n67U142jZvVLXfr7Hzn2FMTOUva cRAheIAv6IpaiN5bqTkfuyZtRL1QdIkOrD55vCSkZwnuQem2TqCY0SwQA5u+GEGu/K mqYP8R4Pf6gEGAVKoSVSR0EMn3unX9wI0H2CVhfEHu7siPhrulzFP2dmthrDrk/100 xkACDdezFjrkUA1BnnJRqQCla0pXJevZN4w72AObgZ6LgT7quN7Nwt5LxW+kbn/eSL csPIDT2Nw7Ju01KrM4+4YtQTElr0dOBaBGwAnVZA7Qf8d4B74EfmZrCQx3ybcD7g1I rV42lf+HV2xhQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , James John , Sasha Levin , corentin.chary@gmail.com, ilpo.jarvinen@linux.intel.com, markgross@kernel.org, acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Subject: [PATCH AUTOSEL 6.5 46/52] platform/x86: asus-wmi: Map 0x2a code, Ignore 0x2b and 0x2c events Date: Sun, 29 Oct 2023 18:53:33 -0400 Message-ID: <20231029225441.789781-46-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029225441.789781-1-sashal@kernel.org> References: <20231029225441.789781-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.5.9 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 29 Oct 2023 16:29:20 -0700 (PDT) From: Hans de Goede [ Upstream commit 235985d1763f7aba92c1c64e5f5aaec26c2c9b18 ] Newer Asus laptops send the following new WMI event codes when some of the F1 - F12 "media" hotkeys are pressed: 0x2a Screen Capture 0x2b PrintScreen 0x2c CapsLock Map 0x2a to KEY_SELECTIVE_SCREENSHOT mirroring how similar hotkeys are mapped on other laptops. PrintScreem and CapsLock are also reported as normal PS/2 keyboard events, map these event codes to KE_IGNORE to avoid "Unknown key code 0x%x\n" log messages. Reported-by: James John Closes: https://lore.kernel.org/platform-driver-x86/a2c441fe-457e-44cf-a146-0ecd86b037cf@donjajo.com/ Closes: https://bbs.archlinux.org/viewtopic.php?pid=2123716 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20231017090725.38163-4-hdegoede@redhat.com Signed-off-by: Sasha Levin --- drivers/platform/x86/asus-nb-wmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index d85d895fee894..df1db54d4e183 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -531,6 +531,9 @@ static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver) static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } }, { KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } }, + { KE_KEY, 0x2a, { KEY_SELECTIVE_SCREENSHOT } }, + { KE_IGNORE, 0x2b, }, /* PrintScreen (also send via PS/2) on newer models */ + { KE_IGNORE, 0x2c, }, /* CapsLock (also send via PS/2) on newer models */ { KE_KEY, 0x30, { KEY_VOLUMEUP } }, { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, { KE_KEY, 0x32, { KEY_MUTE } }, -- 2.42.0