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

From: Dmitry Torokhov

Date: Thu May 28 2026 - 01:35:28 EST


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