rust: add basic serial device bus abstractions
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20251217-rust_serdev-ee5481e9085cVersions newest first
- v16 Latest3 patches 3 repliesApplied
- v153 patches 0 repliesSuperseded
- v143 patches 13 repliesSuperseded
Earlier versions · 13
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v13 | 3 patches | 2 replies | Superseded | |
| v12 | 3 patches | 1 reply | Superseded | |
| v11 | 3 patches | 10 replies | Superseded | |
| v10 | 5 patches | 0 replies | Superseded | |
| v9 | 3 patches | 1 reply | Superseded | |
| v8 | 5 patches | 18 replies | Superseded | |
| v7 | 4 patches | 2 replies | Superseded | |
| v6 | 4 patches | 0 replies | Superseded | |
| v5 | 4 patches | 0 replies | Superseded | |
| v4 | 4 patches | 1 reply | Superseded | |
| v3 | 4 patches | 15 replies | Superseded | |
| v2 | 4 patches | 6 replies | Superseded | |
| v1 RFC | 4 patches | 16 replies | Superseded |
Changes in v16 from the cover letter
- use Jiffies instead of impl Into<Jiffies>, until Jiffies is a newtype
- Link to v15: https://patch.msgid.link/[email protected]
Patches in v16 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | rust: add basic serial device bus abstractionsMAINTAINERS drivers/ rust/ +4 more | +640 | 0 replies | |
| 2/3 | samples: rust: add Rust serial device bus sample device driverMAINTAINERS samples/ samples/ +1 more | +103 | 0 replies | |
| 3/3 | MAINTAINERS: serdev: Add self for serdevMAINTAINERS | +1 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Rob Herring (Arm) |
|---|---|
| 1/3 | |
| 2/3 | |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v16 0/3] rust: add basic serial device bus abstractions
This patch series adds the serdev device bus rust abstraction into the kernel.
This abstraction will be used by a driver, which targets the MCU devices in Synology devices.
Kari Argillander also messaged me, stating that he wants to write a watchdog driver with this abstraction (needing initial device data).
This series depends on [1].
[1] https://lore.kernel.org/rust-for-linux/[email protected]/
---
Changes in v16:
- use Jiffies instead of impl Into<Jiffies>, until Jiffies is a newtype
- Link to v15: https://patch.msgid.link/[email protected]
Changes in v15:
- fix documentation typo
- add documentation for PrivateData::active
- adding missing #[inline] attributes
- replace serdev::Timeout with the use of impl Into<Jiffies>
- This replaces https://lore.kernel.org/rust-for-linux/[email protected]/
- Link to v14: https://patch.msgid.link/[email protected]
Changes in v14:
- fix issues reported by Sashiko:
- fix missing Sync
- fix write buffers allowed with data.len() > i32::MAX
- fix sample driver possibly stalling on full tx buffer
- Link to v13: https://patch.msgid.link/[email protected]
Changes in v13:
- Added Acked-by trailer from Rob. Consider this a RESEND.
- Link to v12: https://patch.msgid.link/[email protected]
Changes in v12:
- fix CoreInternal instead of BoundInternal
- Link to v11: https://patch.msgid.link/[email protected]
Changes in v11:
- redo changes from v9 with the following fixes:
- fix memory leak on probe failure
- fix possible access of dropped drvdata from receive_buf
- Link to v10: https://patch.msgid.link/[email protected]
Changes in v10:
- revert everything from v9, except BoundInternal
- use mutex to ensure receive_buf won't be called on a dropped drvdata.
- Link to v9: https://patch.msgid.link/[email protected]
Changes in v9:
- make use of BoundInternal
- use PrivateData wrapper and drop rust_private_data field
- use non-devm version of serdev_device_open
- Link to v8: https://patch.msgid.link/[email protected]
Changes in v8:
- adapted to driver-lifetime v5 patch series
- add MAINTAINERS file patch
- Link to v7: https://patch.msgid.link/[email protected]
Changes in v7:
- adapted to driver-lifetime patch series
- Link to v6: https://patch.msgid.link/[email protected]
Changes in v6:
- rebased onto v7.1-rc1
- Link to v5: https://patch.msgid.link/[email protected]
Changes in v5:
- fix typo in documentation
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- fixed not selecting rust serdev abstraction in sample
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- fix vertical import style
- add Kconfig entry for the rust abstraction
- fix documentation in include/linux/serdev.h
- rename private_data to rust_private_data
- fix complete_all <-> wait_for_completion typo
- move drvdata_borrow call after the completion
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- fix documentation in serdev::Driver::write and serdev::Driver::write_all
- remove use of dev_info in probe from the sample
- remove properties_parse from the sample
- add optional baudrate property to the sample
- remove 1. patch
- remove TryFrom<&device::Device<Ctx>> for &serdev::Device<Ctx> implementation
- fix import style
- add patch to return reference in devres::register to fix safety
issue
- add patch to add private data to serdev_device, to fix Device.drvdata() from failing
- simplify abstraction by removing ability to receive the initial transmission. It may be added later in a separate patch series if needed.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Markus Probst (3):
rust: add basic serial device bus abstractions
samples: rust: add Rust serial device bus sample device driver
MAINTAINERS: serdev: Add self for serdev
MAINTAINERS | 5 +- drivers/tty/serdev/Kconfig | 7 + rust/bindings/bindings_helper.h | 1 + rust/helpers/helpers.c | 1 + rust/helpers/serdev.c | 22 ++ rust/kernel/lib.rs | 2 + rust/kernel/serdev.rs | 605 +++++++++++++++++++++++++++++++++++++ samples/rust/Kconfig | 11 + samples/rust/Makefile | 1 + samples/rust/rust_driver_serdev.rs | 90 ++++++ 10 files changed, 744 insertions(+), 1 deletion(-)
---
base-commit: 4e63c0582e2aef7284a2cc7c62215f245003e775
change-id: 20251217-rust_serdev-ee5481e9085c