mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v8 0/3] rust: spi: add SPI driver abstractions
@ 2026-11-14  1:05 Shuai Liu
  2026-11-14  1:07 ` [PATCH v8 1/3] rust: helpers: add SPI helpers Shuai Liu
       [not found] ` <20261114010745.82389-1-847807867@qq.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Shuai Liu @ 2026-11-14  1:05 UTC (permalink / raw)
  To: linux-spi
  Cc: rust-for-linux, Mark Brown, ojeda, dakr, linux-kernel, 847807867

Add the Rust abstractions for the SPI driver subsystem, allowing SPI
drivers to be written in Rust.

Changes in v8:
- Rebase onto linux-next (next-20261113); the v7 patches no longer
  applied, per Mark Brown's review.
- Send as a fresh thread rather than as a reply to the previous series,
  per Mark Brown's review.

Changes in v7:
- Rework device I/O around a `transfer()` primitive that maps onto
  spi_sync(), per Mark Brown's review.
- Drop the spi_write()/spi_read() helpers; add
  spi_message_init()/spi_message_add_tail() helpers instead.

Shuai Liu (3):
  rust: helpers: add SPI helpers
  rust: spi: add SPI driver abstractions
  samples: rust: add SPI driver sample

 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/helpers.c          |   1 +
 rust/helpers/spi.c              |  26 ++
 rust/kernel/Kconfig.test        |  11 +
 rust/kernel/lib.rs              |   2 +
 rust/kernel/spi.rs              | 673 ++++++++++++++++++++++++++++++++
 samples/rust/Kconfig            |  11 +
 samples/rust/Makefile           |   1 +
 samples/rust/rust_driver_spi.rs |  66 ++++
 9 files changed, 792 insertions(+)
 create mode 100644 rust/helpers/spi.c
 create mode 100644 rust/kernel/spi.rs
 create mode 100644 samples/rust/rust_driver_spi.rs


Base-commit: 84abb955b1015f216d794566ed3c4fdd4bbd0f14
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-14  1:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14  1:05 [PATCH v8 0/3] rust: spi: add SPI driver abstractions Shuai Liu
2026-11-14  1:07 ` [PATCH v8 1/3] rust: helpers: add SPI helpers Shuai Liu
     [not found] ` <20261114010745.82389-1-847807867@qq.com>
2026-11-14  1:07   ` [PATCH v8 2/3] rust: spi: add SPI driver abstractions Shuai Liu
2026-11-14  1:07   ` [PATCH v8 3/3] samples: rust: add SPI driver sample Shuai Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®