Skip to content

rust: Add basic GPIO consumer abstractions

Kohei Ito linux-gpio lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected] change-id 20260905-add-rust-gpio-consumer-8799f86bbbfd

Versions newest first

  1. v1 Latest3 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rust: gpio: add GPIO module with common definitionsrust/bindings/bindings_helper.h rust/kernel/gpio.rs rust/kernel/lib.rs+155 -05 replies
2/3rust: gpio: Add basic consumer abstractionsrust/bindings/bindings_helper.h rust/kernel/gpio.rs rust/kernel/gpio/consumer.rs+440 -03 replies
3/3sample: rust: Add GPIO consumer sample driversamples/rust/Kconfig samples/rust/Makefile samples/rust/rust_gpio_consumer.rs+168 -08 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] rust: Add basic GPIO consumer abstractions

This series introduces basic GPIO consumer abstractions for Rust.

- Patch 1 adds the top-level GPIO module with minimal common definitions.
- Patch 2 adds the initial GPIO consumer (gpio_desc) abstraction.
- Patch 3 adds a sample driver to demonstrate the use of the Rust GPIO APIs.

---
Kohei Ito (3):
rust: gpio: add GPIO module with common definitions
rust: gpio: Add basic consumer abstractions
sample: rust: Add GPIO consumer sample driver

 rust/bindings/bindings_helper.h    |   2 +
 rust/kernel/gpio.rs                | 154 +++++++++++++
 rust/kernel/gpio/consumer.rs       | 437 +++++++++++++++++++++++++++++++++++++
 rust/kernel/lib.rs                 |   2 +
 samples/rust/Kconfig               |  11 +
 samples/rust/Makefile              |   1 +
 samples/rust/rust_gpio_consumer.rs | 156 +++++++++++++
 7 files changed, 763 insertions(+)

---
base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f
change-id: 20260905-add-rust-gpio-consumer-8799f86bbbfd

Best regards,

Signature · 1 line
Kohei Ito <[email protected]>