[PATCH 0/2] rust/kernel: Add bindings for manually creating devices

Lyude Paul
2025-01-22T23:54:21Z

As many of you are probably aware, there's a number of kernel modules in
the Linux kernel that don't actually probe a device on a bus - but
instead simply create a virtual platform device. One such example is the
virmidi driver (sound/drivers/virmidi.c) These patches add the
ability to do this with our current platform device bindings for rust.

The main usecase for this is the WIP driver, rvkms:

https://patchwork.freedesktop.org/series/131522/

Lyude Paul (2):
rust/kernel: Add platform::Device::from_raw()
rust/kernel: Add platform::ModuleDevice

rust/kernel/platform.rs | 111 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 109 insertions(+), 2 deletions(-)

base-commit: b323d8e7bc03d27dec646bfdccb7d1a92411f189
--
2.47.1