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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B85BC001B0 for ; Sun, 13 Aug 2023 15:54:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232040AbjHMPyC (ORCPT ); Sun, 13 Aug 2023 11:54:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231929AbjHMPxO (ORCPT ); Sun, 13 Aug 2023 11:53:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A47811725; Sun, 13 Aug 2023 08:52:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 566A26331D; Sun, 13 Aug 2023 15:51:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1073C433C7; Sun, 13 Aug 2023 15:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691941916; bh=HoyCcjRheS7n8ngGL0TbAMQnQcI7/RSiD9MtO2dyoU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bu2M+pImgLTojSgj8ZQJ0l97BPaiFUPL2A4Gr6gzXdgoqGGD0Ft434Fx6FoYG4DDQ xOSldl7UBjBfN5c2bnkmEnAABMV9zg5S17sWh3z2KbgYRnY4YBfha7ShWaxbyX98WM 3WNX6/ioFXcze5q4EhEz/ISvkg0KYihsqmfgKHBSERem4Cz8kLcs1T1eT+OyLgdf94 qRyliTUj4kAavLKerpMCenLB+KIwtNc0tBwbRJZrh/ZTF+X93o/wXrgyqllgg79nXf cipnxrXm6RmG6J5RbpqMtCfs7CLL4rXCM0S3MpCHKrR8+8KW738Wix3fg+bVLFg/xz x/9jKzof2Iu0Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Konstantin Shelekhin , Hans de Goede , Sasha Levin , markgross@kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH AUTOSEL 6.4 41/54] platform/x86: huawei-wmi: Silence ambient light sensor Date: Sun, 13 Aug 2023 11:49:20 -0400 Message-Id: <20230813154934.1067569-41-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230813154934.1067569-1-sashal@kernel.org> References: <20230813154934.1067569-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.4.10 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org From: Konstantin Shelekhin [ Upstream commit c21733754cd6ecbca346f2adf9b17d4cfa50504f ] Currently huawei-wmi causes a lot of spam in dmesg on my Huawei MateBook X Pro 2022: ... [36409.328463] input input9: Unknown key pressed, code: 0x02c1 [36411.335104] input input9: Unknown key pressed, code: 0x02c1 [36412.338674] input input9: Unknown key pressed, code: 0x02c1 [36414.848564] input input9: Unknown key pressed, code: 0x02c1 [36416.858706] input input9: Unknown key pressed, code: 0x02c1 ... Fix that by ignoring events generated by ambient light sensor. This issue was reported on GitHub and resolved with the following merge request: https://github.com/aymanbagabas/Huawei-WMI/pull/70 I've contacted the mainter of this repo and he gave me the "go ahead" to send this patch to the maling list. Signed-off-by: Konstantin Shelekhin Link: https://lore.kernel.org/r/20230722155922.173856-1-k.shelekhin@ftml.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- drivers/platform/x86/huawei-wmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/huawei-wmi.c b/drivers/platform/x86/huawei-wmi.c index 70e5c4c0574d5..0ef1c46b617b6 100644 --- a/drivers/platform/x86/huawei-wmi.c +++ b/drivers/platform/x86/huawei-wmi.c @@ -85,6 +85,8 @@ static const struct key_entry huawei_wmi_keymap[] = { { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } }, { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } }, { KE_IGNORE, 0x295, { KEY_KBDILLUMUP } }, + // Ignore Ambient Light Sensoring + { KE_KEY, 0x2c1, { KEY_RESERVED } }, { KE_END, 0 } }; -- 2.40.1