From: ValdikSS <iam@valdikss.org.ru>
To: linux-input@vger.kernel.org
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Rodrigo Aguilera <rodrigoaguileraparraga@gmail.com>
Subject: [PATCH] HID: lenovo: fix Fn-Lock on Lenovo TrackPoint Keyboard II in USB mode
Date: Mon, 20 May 2024 03:05:27 +0300 [thread overview]
Message-ID: <20240520000527.203644-1-iam@valdikss.org.ru> (raw)
When Fn-Lock is pressed on Lenovo TrackPoint Keyboard II in USB mode,
the keyboard only sends the scancode to the host and does not toggle
the mode by itself, contrary to Bluetooth mode.
This results in non-working Fn-Lock switching.
Fix this issue by sending switching command upon receiving Fn-Lock
scancode.
Signed-off-by: ValdikSS <iam@valdikss.org.ru>
Reported-by: Rodrigo Aguilera <rodrigoaguileraparraga@gmail.com>
Tested-by: Rodrigo Aguilera <rodrigoaguileraparraga@gmail.com>
Cc: stable@vger.kernel.org # 6.x
---
drivers/hid/hid-lenovo.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index f86c1ea..a84fc55 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -758,6 +758,13 @@ static int lenovo_event_cptkbd(struct hid_device *hdev,
* ensure things are in sync (the syncing should be a no-op).
*/
cptkbd_data->fn_lock = !cptkbd_data->fn_lock;
+ if (hdev->product == USB_DEVICE_ID_LENOVO_TPIIUSBKBD) {
+ /*
+ * ThinkPad TrackPoint keyboard II in USB mode needs
+ * host to toggle Fn-lock
+ */
+ lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock);
+ }
}
return 0;
--
2.45.1
next reply other threads:[~2024-05-20 0:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 0:05 ValdikSS [this message]
2024-06-10 9:31 ` [PATCH] HID: lenovo: fix Fn-Lock on Lenovo TrackPoint Keyboard II in USB mode ValdikSS
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240520000527.203644-1-iam@valdikss.org.ru \
--to=iam@valdikss.org.ru \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=rodrigoaguileraparraga@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox