Rust for Linux List
 help / color / mirror / Atom feed
From: Nick Dowsett via B4 Relay <devnull+nick42d.gmail.com@kernel.org>
To: "Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>, "Armin Wolf" <W_Armin@gmx.de>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	"Nick Dowsett" <nick42d@gmail.com>
Subject: [PATCH 0/4] rust: wmi: add MVP of WMI abstractions
Date: Sun, 22 Nov 2026 12:28:13 +0800	[thread overview]
Message-ID: <20261122-rust-wmi-v1-0-63111d9e824c@gmail.com> (raw)

Hi there; new to the LKML here, long time Rustacean and Linux user.

I have implemented this series to add an MVP of Rust abstractions for the
WMI subsystem with the bare-minimum implemented to support an in-tree
user, a Clevo laptop keyboard backlight driver
(`https://github.com/nick42d/linux/pull/4`).

Patches to follow for the driver. Note it has two other dependencies:
Markus Probst's LED classdev abstractions (v28) and basic DMI matching
abstractions.

This was not directly influenced by Ilya Gladyshev's previous attempt as
I was not aware of it, upon review, the key difference is that I have
used the newer buffer-based interface (no `acpi_object`), and implemented
less functionality/callbacks.

What's covered is driver probe, registration and unregistration, device
id table, and a safe implementation of `wmidev_invoke_method` that
returns an owned RAII buffer.

Signed-off-by: Nick Dowsett <nick42d@gmail.com>
---
Nick Dowsett (4):
      rust: wmi: add basic WMI device abstraction
      rust: wmi: add DeviceId and wmi_device_table! macro
      rust: wmi: add Driver trait, Adapter and implement RegistrationOps
      rust: wmi: add Buffer and Device::invoke_method()

 MAINTAINERS                     |   1 +
 rust/bindings/bindings_helper.h |   1 +
 rust/kernel/lib.rs              |   2 +
 rust/kernel/wmi.rs              | 361 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 365 insertions(+)
---
base-commit: 4843f6873f7c4835e62f2c73ba0fd538e57a2f22
change-id: 20261119-rust-wmi-c6b0e0fe97a7

Best regards,
--  
Nick Dowsett <nick42d@gmail.com>



             reply	other threads:[~2026-11-22  4:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  4:28 Nick Dowsett via B4 Relay [this message]
2026-11-22  4:28 ` [PATCH 1/4] rust: wmi: add basic WMI device abstraction Nick Dowsett via B4 Relay
2026-11-22  4:28 ` [PATCH 2/4] rust: wmi: add DeviceId and wmi_device_table! macro Nick Dowsett via B4 Relay
2026-11-22  4:28 ` [PATCH 3/4] rust: wmi: add Driver trait, Adapter and implement RegistrationOps Nick Dowsett via B4 Relay
2026-11-22  4:28 ` [PATCH 4/4] rust: wmi: add Buffer and Device::invoke_method() Nick Dowsett via B4 Relay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261122-rust-wmi-v1-0-63111d9e824c@gmail.com \
    --to=devnull+nick42d.gmail.com@kernel.org \
    --cc=W_Armin@gmx.de \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nick42d@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox