Re: [PATCH v10 1/4] HID: hid-msi: Add MSI Claw configuration driver

From
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date
2026-05-28 05:32:07
Also in
linux-doc, lkml
Reply to
Derek J. Clark, 2026-05-27
Hi Derek,

On Wed, May 27, 2026 at 10:21:19PM +0000, Derek J. Clark wrote:
Adds configuration HID driver for the MSI Claw series of handheld PC's.
In this initial patch add the initial driver outline and attributes for
changing the gamepad mode, M-key behavior, and add a WO reset function.

Sending the SWITCH_MODE and RESET commands causes a USB disconnect in
the device. The completion will therefore never get hit and would trigger
an -EIO. To avoid showing the user an error for every write to these
attrs a bypass for the completion handling is introduced when timeout ==
0.

The initial version of this patch was written by Denis Benato, which
contained the initial reverse-engineering and implementation for the
gamepad mode switching. This work was later expanded by Zhouwang Huang
to include more gamepad modes. Finally, I refactored the drivers data
in/out flow and overall format to conform to kernel driver best
practices and style guides. Claude was used as an initial reviewer of
this patch.
I wonder why do you need to roll asynchronous probing and asynchronous
resume by hand? This I think complicates the driver greatly and forces
you to use a ton of works, spinlocks, and checks.

Thanks.

-- 
Dmitry
Thread (14 messages) 14 messages, 3 authors, last reply 2026-06-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help