[PATCH v5 0/2] Initial work for Rust abstraction for HID device driver development

From: Rahul Rameshbabu
Date: Thu Sep 18 2025 - 03:08:51 EST


Haa.... My v4 had a build system bug, so I never properly test
GloriousRust. I did not implement the RawDeviceIdIndex trait in v4. My v5
should properly exercise the reference driver.

I wanted to thank Benjamin for his response on the previous v3 RESEND.
Greatly appreciated. I have gone ahead with some minor logistical changes
in the series, based on his response. I have dropped the C patch since he
also took that patch into the hid tree in v3.

Link: https://lore.kernel.org/rust-for-linux/wjfjzjc626n55zvhksiyldobwubr2imbvfavqej333lvnka2wn@r4zfcjqtanvu/
Link: https://lore.kernel.org/rust-for-linux/175810473311.3076338.14309101339951114135.b4-ty@xxxxxxxxxx/

Rahul Rameshbabu (2):
rust: core abstractions for HID drivers
rust: hid: Glorious PC Gaming Race Model O and O- mice reference
driver

MAINTAINERS | 14 +
drivers/hid/Kconfig | 2 +
drivers/hid/Makefile | 2 +
drivers/hid/hid-glorious.c | 2 +
drivers/hid/hid_glorious_rust.rs | 60 +++
drivers/hid/rust/Kconfig | 28 ++
drivers/hid/rust/Makefile | 6 +
drivers/hid/rust/hid_glorious_rust.rs | 60 +++
rust/bindings/bindings_helper.h | 3 +
rust/kernel/hid.rs | 513 ++++++++++++++++++++++++++
rust/kernel/lib.rs | 2 +
11 files changed, 692 insertions(+)
create mode 100644 drivers/hid/hid_glorious_rust.rs
create mode 100644 drivers/hid/rust/Kconfig
create mode 100644 drivers/hid/rust/Makefile
create mode 100644 drivers/hid/rust/hid_glorious_rust.rs
create mode 100644 rust/kernel/hid.rs


base-commit: 657403637f7d343352efb29b53d9f92dcf86aebb
--
2.51.0