From: Shuai Liu <847807867@qq.com>
To: linux-spi@vger.kernel.org
Cc: rust-for-linux@vger.kernel.org, Mark Brown <broonie@kernel.org>,
ojeda@kernel.org, dakr@kernel.org, linux-kernel@vger.kernel.org,
847807867@qq.com
Subject: [PATCH v8 0/3] rust: spi: add SPI driver abstractions
Date: Sat, 14 Nov 2026 09:05:04 +0800 [thread overview]
Message-ID: <tencent_5FBF490F375F4C66A2C8DD421A8E8542FE05@qq.com> (raw)
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
next reply other threads:[~2026-11-14 1:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 1:05 Shuai Liu [this message]
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
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=tencent_5FBF490F375F4C66A2C8DD421A8E8542FE05@qq.com \
--to=847807867@qq.com \
--cc=broonie@kernel.org \
--cc=dakr@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/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
all inboxes | Powered by JetHome®