From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.112 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796300117; b=2Ya+vYW8Iyu+N3iRonDaiBITFF/8ITEyLFB0A3i9Y+guXuAANzDAlp2/MoowZq/lowJw nA2xoXyCl/79874SJ6sznvX++9naDDxRmKUxEfdjE9J+ydMyAvD1eKzX38M/QuAAEnRKn 78JtMv9598Vp7lGGH3WE+e2sgB+naNXnl0Ikv7TbvM93GERyoeI9G9tYu6IvpHvpzc7RM gYvgZI6toe6Sct+GmRZtcIjBK9L2jiKCy54at+KHB6hBASIAUrBxWuQGfEo2sfGNlFHz5 /IkcquiQWvfWG1z5ggll5vQqSf3Bd37i9oFhYf7JjajyLlQ97whLFw8edIeRTm0xMpQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796300117; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Subject:From:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date: MIME-Version:User-Agent:X-ZohoMailClient; bh=WRzjpFywgl6Ge8XlcCaQiVcizMDsvGX957laN755QCY=; b=n7WpKiFaRRzS6oKLBBaksS/fSEy7sYiN9XZ/QVrupQXDGgWc42AU8droewVPEliz+jdo TifipUIzbBS9GeaPQaYHOW0jlHH+Ar0FS3EP5r/DxxT6seL9qZzMuRqW539726+4DirwB mWTt9PayOYbSq0d9lCCxLTXI7bg33oGFL424btj9wLIoydqLx44LSbSIK0Hdw8xdalGX3 LqnBLbbFnNUlmWsrA9ri3sh8z4usKoZrDJcl2dI7LtROrad1sSiKJMzuDucpwhHqv1Scd hIe9DLSRLxd7DkeUfJfWZBa1zyX6yVLUwCt4BZGc9J11uElummkwy7ojSYPIVnSTHXQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=rong.moe; spf=pass smtp.mailfrom=rong.moe; dkim=pass header.d=rong.moe header.i=@rong.moe header.a=rsa-sha256 header.s=zmail2048 header.b=c1FOLV5f; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.112 Received: from sender5-pp-f112.zoho.com (sender5-pp-f112.zoho.com [165.173.182.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1F28606A69D; Thu, 3 Dec 2026 12:15:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D1F28606A69D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rong.moe Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rong.moe Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=rong.moe header.i=@rong.moe header.a=rsa-sha256 header.s=zmail2048 header.b=c1FOLV5f ARC-Seal: i=1; a=rsa-sha256; t=1796300100; cv=none; d=zohomail.com; s=zohoarc; b=B1666Vm571J1zOuatFtZFMAOUdYyNGkIx9wo46A5TT2KszUOeoyTxfsD9uphoNuQZD8oJg9NyxVRiBlSk3b06VhmmQCOI4qmjX+b220ohO3mncbaELrzEKZEcrIibqkI7QhkzjN6QQ4Xf1HMaB7bAnmAlElDKePXjwPjnT2lDgI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796300100; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=WRzjpFywgl6Ge8XlcCaQiVcizMDsvGX957laN755QCY=; b=SP1p6Dl7jdSmoxafnrx9YJWECep9wvtg1ryDj7r83xDC6flxPLhrQUGLqFbYKh8HEadUdwQ1AY4/WY9BBm6BpvDb/oJbDgv7Dk0ElWqgykzu+ypYsrYUYDlhn/xsiKVhcx57l09oWJaAKJ9c5eEWrntJNMH3cCwn5ARgb/yMj6g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=rong.moe; spf=pass smtp.mailfrom=i@rong.moe; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=c1FOLV5fioYZxFqMgEZJ+s2hABhQabO2vYGrGEJlSI8pSUfeXUHwQoMyutYdEmH1CpNX5AFolrxplJ9xZPvAjPcQKxoA9Bk4lrptV1ep9MPj24T1mS70KGGw9kOzZrrxJXEDCYWYYS7zSHPVIU4Trsfu9fpLdmvPSXT676xZsyGvLdXvUW1gC+B2EhV5aLt/kXdnNuVyXAsSe9KkfrTaHOIZ+H4RQir7fyFN/MOW5YRUgGX1WPKX5glyu5xKKOtYgD8DfBbYaKqmIc/ZivLSnfGx/sAL3zHLlLXT94O3B2BIsT3l5mK7MMvC1S+7iS4RFjYHAWuzucbG7xfwkBbWKg==; c=relaxed/relaxed; s=zmail2048; d=rong.moe; v=1; bh=WRzjpFywgl6Ge8XlcCaQiVcizMDsvGX957laN755QCY=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796300097915492.209983859089; Thu, 3 Dec 2026 04:14:57 -0800 (PST) Message-ID: <57e94bc61605554f3dafb34bf33b6a6b3d46cca9.camel@rong.moe> Subject: Re: [PATCH v5 4/4] platform: lenovo: wmi-fn-keys: ignore all Legion keyboard backlight events From: Rong Zhang To: David Cemin , hansg@kernel.org, ilpo.jarvinen@linux.intel.com, W_Armin@gmx.de Cc: mpearson-lenovo@squebb.ca, derekjohn.clark@gmail.com, xy-jackie@139.com, marco_giunta@outlook.it, ciro.pedrini@gmail.com, ldemarchi@nvidia.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20261203000251.1006053-5-dcemin@nvidia.com> References: <20261130043245.758932-1-dcemin@nvidia.com> <20261203000251.1006053-1-dcemin@nvidia.com> <20261203000251.1006053-5-dcemin@nvidia.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 20:09:52 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Evolution 3.62.1-4 X-ZohoMailClient: External Hi David, On Wed, 2026-12-02 at 16:02 -0800, David Cemin wrote: > The keymap ignores 0x19, 0x1a and 0x21, which the Legion Pro 7 16IAX10H > was seen to emit for Fn+Down, Fn+Up and Fn+Space. Marco reports that on > the Legion Pro 7 16AFR10H these events do not name a key, they encode > the state that was reached: Fn+Up and Fn+Down report the new brightness > level (0x18 off, 0x19 low, 0x1a medium, 0x26 high) and Fn+Space reports > the new lighting preset (0x20 to 0x25). The three codes ignored today > are "low", "medium" and "preset 2", so the other seven still reach > userspace as KEY_UNKNOWN. >=20 > The keyboard controller handles these keys itself and reports the > brightness on its own HID interface, so none of the events carries an > action for the OS. Ignore all ten. >=20 > I have no Legion to test this on: the codes are taken from the report > linked below. >=20 > Suggested-by: Marco Giunta > Link: https://lore.kernel.org/r/BYAPR19MB229323713AAFB68EC5D8443EFC402@BY= APR19MB2293.namprd19.prod.outlook.com > Signed-off-by: David Cemin Reviewed-by: Rong Zhang Thanks, Rong > --- > drivers/platform/lenovo/wmi-fn-keys.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/platform/lenovo/wmi-fn-keys.c b/drivers/platform/len= ovo/wmi-fn-keys.c > index dc5749be7d83..3710b2232fe3 100644 > --- a/drivers/platform/lenovo/wmi-fn-keys.c > +++ b/drivers/platform/lenovo/wmi-fn-keys.c > @@ -71,10 +71,24 @@ static const struct key_entry lwmi_fn_keys_keymap[] = =3D { > =09{ KE_IGNORE,=090x02 | LWMI_FN_KEY }, > =09/* Esc (handled by the firmware) */ > =09{ KE_IGNORE,=090x03 | LWMI_FN_KEY }, > -=09/* Keyboard backlight down, up and effect (handled by the keyboard) *= / > +=09/* > +=09 * Legion keyboard backlight level after Fn+Up/Down, handled by the > +=09 * keyboard: 0x18 off, 0x19 low, 0x1a medium, 0x26 high > +=09 */ > +=09{ KE_IGNORE,=090x18 | LWMI_FN_KEY }, > =09{ KE_IGNORE,=090x19 | LWMI_FN_KEY }, > =09{ KE_IGNORE,=090x1a | LWMI_FN_KEY }, > +=09{ KE_IGNORE,=090x26 | LWMI_FN_KEY }, > +=09/* > +=09 * Legion keyboard lighting preset after Fn+Space, handled by the > +=09 * keyboard: 0x20 to 0x25 are presets 1 to 6 > +=09 */ > +=09{ KE_IGNORE,=090x20 | LWMI_FN_KEY }, > =09{ KE_IGNORE,=090x21 | LWMI_FN_KEY }, > +=09{ KE_IGNORE,=090x22 | LWMI_FN_KEY }, > +=09{ KE_IGNORE,=090x23 | LWMI_FN_KEY }, > +=09{ KE_IGNORE,=090x24 | LWMI_FN_KEY }, > +=09{ KE_IGNORE,=090x25 | LWMI_FN_KEY }, > =09/* > =09 * Keyboard backlight level after Fn+Space, handled by the firmware: > =09 * 0x40 off, 0x41 low, 0x42 high