Skip to content

RFC rust: WMI abstractions

Gladyshev Ilya linux-acpi lkml llvm oe-kbuild-all platform-driver-x86 rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rust: implement wrapper for acpi_objectrust/kernel/acpi.rs+103 -06 replies
2/3rust: introduce WMI abstractionsrust/bindings/bindings_helper.h rust/kernel/lib.rs rust/kernel/wmi.rs+270 -04 replies
3/3rust: sample driver for WMI demonstrationsdrivers/platform/x86/Makefile drivers/platform/x86/redmi_wmi_rs.rs+61 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] rust: WMI abstractions

Overview
========
This patchset was developed some time ago out of pure curiosity about the R4L project, but I believe it may still be useful, so I decided to resume and post this work.
The goal of my curiosity is to develop a simple WMI driver in Rust for unsupported laptop (I have some laying around) or, as a last resort, submit a rewrite of redmi-wmi as a sample driver -- if that would be acceptable.

I know that there is an undergoing API change in the WMI subsystem[1], however it doesn't change the abstracted surface a lot.

This patchset consists of 3 patches:
1. Wrapper around ACPI objects (this may be unneeded after [1])
2. WMI abstractions
3. Sample driver for demonstration purposes only

Why RFC?
========
1. No real users for now
2. I have a feeling that I am doing something very wrong

[1]: https://lore.kernel.org/platform-driver-x86/[email protected]/

Gladyshev Ilya (3):
rust: implement wrapper for acpi_object
rust: introduce WMI abstractions
rust: sample driver for WMI demonstrations

 drivers/platform/x86/Makefile        |   1 +
 drivers/platform/x86/redmi_wmi_rs.rs |  60 ++++++
 rust/bindings/bindings_helper.h      |   1 +
 rust/kernel/acpi.rs                  | 103 +++++++++++
 rust/kernel/lib.rs                   |   2 +
 rust/kernel/wmi.rs                   | 267 +++++++++++++++++++++++++++
 6 files changed, 434 insertions(+)
 create mode 100644 drivers/platform/x86/redmi_wmi_rs.rs
 create mode 100644 rust/kernel/wmi.rs

base-commit: 9094662f6707d1d4b53d18baba459604e8bb0783

Signature · 1 line
2.51.1.dirty