From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f42.google.com (mail-dl1-f42.google.com [74.125.82.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 030343CB8E2 for ; Wed, 13 May 2026 23:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778714090; cv=none; b=MJvbifvdZjqidmqpF3eydyKe39d9BsITWzPio/3OR+t+iT8hfMNRU4VqOTh8c8adXlYm1V5LtZ+BmazkoUUR8Mxad5EO9tGZVo2ovUkJdrMJ9/6PZav2Zni984yD+34KCI3LOKYN/ETCtFMF4udqvIkNNZ/dg3iaDf0+I2GA8+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778714090; c=relaxed/simple; bh=K6PKd4H2GUDjEMG535NEhISnX1SdVID4QkqXKWAf4Qc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WeDZPu7jf3EOqCDHGuvw8MTkUyBfmaOsrRUdz4PyBwEjFdzj1QWnzgDsPPrYsVaUFWarbxB5n4pw5eIUsq5QX/bShWuPqzq+t8/rJaTs3vo3KSueo0rMqlf+qlh3Ksfw1rAa3QvujIjkT+K3TCAaAcUkWt4CROLvO9BFpDWGvbg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cueGf/yS; arc=none smtp.client-ip=74.125.82.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cueGf/yS" Received: by mail-dl1-f42.google.com with SMTP id a92af1059eb24-134ac81c445so1408178c88.1 for ; Wed, 13 May 2026 16:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778714088; x=1779318888; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G7boWG2DePp4L/Rr95VCxMXwtbh9aReFy99QRlnNGMs=; b=cueGf/yS+IsQSvuUPfCcE2cybvmdviF14UAzW8Zi74zEM6tS7gWqnGX1ez7bczkkLn 18uLVvgOFk6hsFVAjulmr7QGq8CCqorcQ0jSchsVc2DI1Ff6bk/ETzvtrpw/ub9ZLC3h vPdp6l1gYlL4UC3y2w+1tfKt0V5U4w/+83Ky1V+xtst0qe8G88tFMUqZ/TTa+9IuzGcE MHqPJ0VneD3xcACMYZOj97n5QGNQfYYYvfgerzXslt2nz/ezgTXX2udy9pD3ae2mshTA mIz/9R4vlFM8rH1CTy830CvzZIsUVfiMB4ThrMw6rs//ibm1gO+IX1FpGbV3zPEnZaTE AVng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778714088; x=1779318888; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=G7boWG2DePp4L/Rr95VCxMXwtbh9aReFy99QRlnNGMs=; b=MpOxu7fI0gNHVjqlhYFatGyig6CjdSaFbK2dPO0k87kG1G4Q5CUhrF++HQpZLG5LUY Z4UBj1TEp2SXCtsSHa2vja8QbBjlYt2ChAqN/ao56xEWgurlcAotetZ3+mP4j5XVBJqS yoxIlmQDzm0cFYALKS/KpN/BWq0AJWuZJGFRAs8MU1m19gdjgeixgGj5SdA6GCi4dMoX klMMOfffSvKvvrbEkPgxTjSKTrBtFddbiY5kXbiZ4PZnqv8emMSQxUGDcFPPHP6886/6 OdvBMn0/lG5RjwKC4yxuhMkC8GaXPTcbCKIjocbxNji9YSzTAxezFVM3u2NiBLtfpwx5 +Ieg== X-Forwarded-Encrypted: i=1; AFNElJ+yn3jb4YjtanG8GNow8f+7kA1M7jqx8AvmNN/EzuyVV1iO6Wwn0xyw8uXDfAeKtu9GMWm+DkrYR90=@vger.kernel.org X-Gm-Message-State: AOJu0YwarB1nNIjgbBw+FLqiAvae78CkRHd4hcjn6wckbnC/Po9To6FH Szoauxz/qH7zX4c1SczQJczM13pN5m3+bkEKwTLYWC7VMtm+c5aMcYbb X-Gm-Gg: Acq92OGcVO3ybkxxMrwPEtUHxPziM6P25b/1F5EQVl/IdDe906UP3KMqessokAzNzBI UHljZ6hUaS2GM4NnY83Xa/w46BxF0piMfTPHtydx9mj/WnwCBITtYbk7q3uvB0oAi9htm6RZLLP l6aEEBErkk23U/Hmg+0dWRQ+U1HgQUWjV1qaxn3RZH8T/WsdAxxBvSLNkdTE/oEbUJYQXd1TmHA U/tmDAM7fYBNRAid7C8Rasxv+lrsBkzA21E5gMJWzHGcd0qcjgN7ujyQxKWhcPu/Spa5T8VuljV 1xf0Jdjp1uPmIAwkffGm7bsIQM1ygNsnSstB3wr9cQuQ0QIpplRaKcRWyqGiJ6b1u7MuFBdpsbf pGbKOCMepzeSNz8qakYsCzMYyTAVhlxQUACShRIspKByKrhRL/NuYfFnggeb0cWsUHBuH7ezKsa ijLqWnGkK7h9oGiNkyUuv2okefPEH1/Vq+sm5twpilNzpSpiE/GY/3WBXsmT7rj3gJCy+yWqFe5 oJd X-Received: by 2002:a05:7022:ec8c:b0:12d:ea4f:99de with SMTP id a92af1059eb24-13428b94b05mr3497543c88.0.1778714087958; Wed, 13 May 2026 16:14:47 -0700 (PDT) Received: from lappy (108-228-232-20.lightspeed.sndgca.sbcglobal.net. [108.228.232.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-134cc2352f2sm1379258c88.10.2026.05.13.16.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 16:14:47 -0700 (PDT) From: "Derek J. Clark" To: Jiri Kosina , Benjamin Tissoires Cc: "Pierre-Loup A . Griffais" , Denis Benato , Zhouwang Huang , "Derek J . Clark" , linux-input@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] Add MSI Claw HID Configuration Driver Date: Wed, 13 May 2026 23:14:41 +0000 Message-ID: <20260513231445.3213501-1-derekjohn.clark@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series adds an HID Configuration driver for the MSI Claw line of Handheld Gaming PC's. The MSI Claw HID interface provides multiple features, such as the ability to switch between xinput, dinput, and a desktop mode, RGB control, rumble intensity, and mapping of the rear "M" keys. There are additional gamepad modes that are not included in this driver as they appear to be used in assembly line testing or are incomplete in the firmware. During my testing I found them to be unstable. The initial version of this driver 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 and additional features. Finally, I refactored the entire driver, fixed multiple bugs, and refined the overall format to conform to kernel driver best practices and style guide. Claude was used initially by Zhouwang Huang to quickly parse HID captures during the reverse-engineering of some of the features. Since Claude had already been used, as a test of its capabilities I had it implement the rumble intensity attribute after I had already rewritten most of the driver, which I then manually edited to fix some mistakes. I also used Claude to review the driver and these patches for any mistakes and bugs. Assisted-by: Claude:claude-sonnet-4-6 Co-developed-by: Denis Benato Signed-off-by: Denis Benato Co-developed-by: Zhouwang Huang Signed-off-by: Zhouwang Huang Signed-off-by: Derek J. Clark --- v2: - Use mutexes to guard SYNC_TO_ROM calls and pending_profile calls. - Rename driver to hid-msi and add generic entrypoints for probe/resume/remove that call claw specific functions in order to future proof the driver for other MSI HID interfaces. - Fix various bugs and formatting issues. Derek J. Clark (4): HID: hid-msi: Add MSI Claw configuration driver HID: hid-msi: Add M-key mapping attributes HID: hid-msi: Add RGB control interface HID: hid-msi: Add Rumble Intensity Attributes MAINTAINERS | 6 + drivers/hid/Kconfig | 12 + drivers/hid/Makefile | 1 + drivers/hid/hid-ids.h | 6 + drivers/hid/hid-msi.c | 1663 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1688 insertions(+) create mode 100644 drivers/hid/hid-msi.c -- 2.53.0