The following has been changed: - introduce a new C serdev API to fix race conditions and simplify rust code. Should also be useful on the C side. - fix race conditions - simplify rust code - add rust function to provide mutable references to driver's private data - provide mutable references in callbacks to avoid the need for a SpinLock in the greybus patch series [1]
[1] https://lore.kernel.org/rust-for-linux/20260827-gb-uart-transport-v2-7-a03bb...
Signed-off-by: Markus Probst markus.probst@posteo.de --- Markus Probst (5): tty: serdev: Export functions to pause receive_buf callback calls rust: serdev: Replace `active` mutex with receive pause rust: serdev: Simplify callbacks rust: Add `Device::drvdata_borrow_mut` rust: serdev: Pause receive callback before calling unbind
drivers/tty/serdev/core.c | 50 +++++++++- drivers/tty/serdev/serdev-ttyport.c | 32 ++++++ include/linux/serdev.h | 6 ++ rust/kernel/device.rs | 24 +++++ rust/kernel/serdev.rs | 189 +++++++++++++----------------------- samples/rust/rust_driver_serdev.rs | 2 +- 6 files changed, 180 insertions(+), 123 deletions(-) --- base-commit: e5e04726cdd043e309677071ab1b65a4b18f422b change-id: 20260905-rust_serdev_probe_refactor-0e2b044354a7