| From: |
| Markus Probst <markus.probst-AT-posteo.de> |
| To: |
| Danilo Krummrich <dakr-AT-kernel.org>, Miguel Ojeda <ojeda-AT-kernel.org>, Alex Gaynor <alex.gaynor-AT-gmail.com>, Lee Jones <lee-AT-kernel.org>, Pavel Machek <pavel-AT-kernel.org> |
| Subject: |
| [PATCH 0/2] rust: leds: add led classdev abstractions |
| Date: |
| Thu, 09 Oct 2025 17:07:55 +0000 |
| Message-ID: |
| <20251009170739.235221-1-markus.probst@posteo.de> |
| Cc: |
| Lorenzo Stoakes <lorenzo.stoakes-AT-oracle.com>, Vlastimil Babka <vbabka-AT-suse.cz>, "Liam R. Howlett" <Liam.Howlett-AT-oracle.com>, Uladzislau Rezki <urezki-AT-gmail.com>, Boqun Feng <boqun.feng-AT-gmail.com>, Gary Guo <gary-AT-garyguo.net>, bjorn3_gh-AT-protonmail.com, Benno Lossin <lossin-AT-kernel.org>, Andreas Hindborg <a.hindborg-AT-kernel.org>, Alice Ryhl <aliceryhl-AT-google.com>, Trevor Gross <tmgross-AT-umich.edu>, Markus Probst <markus.probst-AT-posteo.de>, rust-for-linux-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, linux-leds-AT-vger.kernel.org |
| Archive-link: |
| Article |
This patch series has previously been contained in
https://lore.kernel.org/rust-for-linux/20251008181027.662...
which added a rust written led driver for a microcontroller via i2c.
As the reading and writing to the i2c client via the register!
macro has not been implemented yet [1], the patch series will only
contain the additional abstractions required.
[1] https://lore.kernel.org/rust-for-linux/DDDS2V0V2NVJ.16ZKX...
The following changes were made:
* add basic Pin<Vec<T, A>> abstractions, that allow to initialize PinInit items with
the gurantee that these will never be moved.
* add basic led classdev abstractions to register and unregister leds
Markus Probst (2):
rust: add basic Pin<Vec<T, A>> abstractions
rust: leds: add basic led classdev abstractions
rust/kernel/alloc.rs | 1 +
rust/kernel/alloc/kvec.rs | 86 +++++++++++
rust/kernel/led.rs | 296 ++++++++++++++++++++++++++++++++++++++
rust/kernel/lib.rs | 1 +
rust/kernel/prelude.rs | 2 +-
5 files changed, 385 insertions(+), 1 deletion(-)
create mode 100644 rust/kernel/led.rs
--
2.49.1