[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251008181027.662616-1-markus.probst@posteo.de>
Date: Wed, 08 Oct 2025 18:10:42 +0000
From: Markus Probst <markus.probst@...teo.de>
To: Lee Jones <lee@...nel.org>,
Pavel Machek <pavel@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Igor Korotin <igor.korotin.linux@...il.com>
Cc: Markus Probst <markus.probst@...teo.de>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Uladzislau Rezki <urezki@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
bjorn3_gh@...tonmail.com,
Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>,
Daniel Almeida <daniel.almeida@...labora.com>,
linux-leds@...r.kernel.org,
rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/4] Add first led driver written in Rust
This patch series adds the first led driver written in Rust to the
kernel.
The following changes were made:
* extends the not-yet-merged i2c patch series (see below) to include
abstractions for reading and writing to i2c clients.
* add a wrapper of Vec, that allows to initialize PinInit items with
the gurantee that these will never be moved.
* add basic led classdev abstractions to register and unregister leds
* add a driver for the atmega1608 microcontroller used in synology
devices.
This patch series requires and is based on:
https://lore.kernel.org/rust-for-linux/20251005102226.41876-1-igor.korotin.linux@gmail.com/T/#t
Atmega1608 is a programmable microcontroller. It has been preprogrammed
to allow leds being controlled via the i2c bus. This driver can only be
used on synology devices using this microcontroller.
Information on how to interact with it, has been gained by viewing the
drivers/leds/leds-atmega1608.c file licensed under GPL found here (thats the only documentation):
https://global.synologydownload.com/download/ToolChain/Synology%20NAS%20GPL%20Source/7.2-72806/r1000/linux-4.4.x.txz
Markus Probst (4):
rust: i2c: add read and write byte data abstractions
rust: add pinned wrapper of Vec
rust: leds: add basic led classdev abstractions
leds: add driver for synology atmega1608 controlled LEDs
MAINTAINERS | 6 +
drivers/leds/Kconfig | 9 +
drivers/leds/Makefile | 1 +
drivers/leds/leds_atmega1608.rs | 377 ++++++++++++++++++++++++++++++++
rust/kernel/alloc/kvec.rs | 86 ++++++++
rust/kernel/i2c.rs | 45 ++++
rust/kernel/led.rs | 299 +++++++++++++++++++++++++
rust/kernel/lib.rs | 1 +
8 files changed, 824 insertions(+)
create mode 100644 drivers/leds/leds_atmega1608.rs
create mode 100644 rust/kernel/led.rs
--
2.49.1
Powered by blists - more mailing lists