public inbox for linux-rtc@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/5] rust: Add RTC driver support
@ 2026-01-16 16:21 Ke Sun
  2026-01-16 16:21 ` [RFC PATCH v3 1/5] rtc: add device selector for rtc_class_ops callbacks Ke Sun
                   ` (4 more replies)
  0 siblings, 5 replies; 43+ messages in thread
From: Ke Sun @ 2026-01-16 16:21 UTC (permalink / raw)
  To: Alexandre Belloni, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich
  Cc: linux-rtc, rust-for-linux, Alvin Sun, Ke Sun

This patch series adds RTC (Real-Time Clock) driver support for the Rust
kernel, including the necessary infrastructure and a complete driver
implementation for the PL031 RTC.

---
v3:
- Add rtc_ops_dev() helper with RTC_OPS_USE_RTC_DEV flag to allow drivers to
  choose device pointer for rtc_class_ops callbacks. This enables Rust RTC
  drivers to store drvdata on rtc->dev while maintaining backward compatibility
  for existing C drivers without requiring driver modifications
- Refactor AMBA and RTC abstractions to address v2 review feedback

v2: https://lore.kernel.org/rust-for-linux/20260107143738.3021892-1-sunke@kylinos.cn/
- Migrate RTC driver data storage from parent device to RTC device for
  unified interface
- Expand AMBA bus abstractions to full driver support with enhanced
  functionality
- Refactor device wakeup API by moving wake IRQ setup to IRQ layer
- Simplify RTC core framework by removing multi-bus abstractions,
  focusing on core operations
- Optimize PL031 driver implementation and remove build assertion
  dependency

v1: https://lore.kernel.org/rust-for-linux/20260104060621.3757812-1-sunke@kylinos.cn/
- Add AMBA bus abstractions
- Add device wakeup support
- Add RTC core framework with multi-bus support
- Add PL031 RTC driver

---

Ke Sun (5):
  rtc: add device selector for rtc_class_ops callbacks
  rust: add AMBA bus driver support
  rust: add device wakeup capability support
  rust: add RTC core abstractions and data structures
  rust: add PL031 RTC driver

 drivers/rtc/Kconfig             |    9 +
 drivers/rtc/Makefile            |    1 +
 drivers/rtc/dev.c               |    6 +-
 drivers/rtc/interface.c         |   18 +-
 drivers/rtc/proc.c              |    2 +-
 drivers/rtc/rtc_pl031_rust.rs   |  513 ++++++++++++++++
 include/linux/rtc.h             |   15 +
 rust/bindings/bindings_helper.h |    3 +
 rust/helpers/device.c           |    6 +
 rust/helpers/helpers.c          |    1 +
 rust/helpers/rtc.c              |    9 +
 rust/kernel/amba.rs             |  441 ++++++++++++++
 rust/kernel/device.rs           |   18 +-
 rust/kernel/irq/request.rs      |   17 +
 rust/kernel/lib.rs              |    4 +
 rust/kernel/rtc.rs              | 1008 +++++++++++++++++++++++++++++++
 16 files changed, 2057 insertions(+), 14 deletions(-)
 create mode 100644 drivers/rtc/rtc_pl031_rust.rs
 create mode 100644 rust/helpers/rtc.c
 create mode 100644 rust/kernel/amba.rs
 create mode 100644 rust/kernel/rtc.rs


base-commit: 944aacb68baf7624ab8d277d0ebf07f025ca137c
-- 
2.43.0


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

end of thread, other threads:[~2026-02-27 15:09 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 16:21 [RFC PATCH v3 0/5] rust: Add RTC driver support Ke Sun
2026-01-16 16:21 ` [RFC PATCH v3 1/5] rtc: add device selector for rtc_class_ops callbacks Ke Sun
2026-01-16 16:24   ` Ke Sun
2026-01-19 14:32   ` Danilo Krummrich
2026-01-20  8:01     ` Ke Sun
2026-02-20 22:53       ` Alexandre Belloni
2026-02-21  9:31         ` Alvin Sun
2026-02-21 11:16           ` Alexandre Belloni
2026-02-21 11:19             ` Rafael J. Wysocki
2026-02-21 14:33               ` Danilo Krummrich
2026-02-22  0:05                 ` Alexandre Belloni
2026-02-22 12:49                   ` Danilo Krummrich
2026-02-22 14:01                     ` Rafael J. Wysocki
2026-02-22 16:13                       ` Danilo Krummrich
2026-02-24  0:12                         ` Danilo Krummrich
2026-02-24 13:28                           ` Rafael J. Wysocki
2026-02-24 14:57                             ` Alexandre Belloni
2026-02-24 15:23                               ` Rafael J. Wysocki
2026-02-24 15:36                                 ` Danilo Krummrich
2026-02-24 15:01                           ` Alexandre Belloni
2026-02-24 16:35                             ` Danilo Krummrich
2026-02-24 16:42                               ` Danilo Krummrich
2026-02-24 17:28                               ` Alexandre Belloni
2026-02-24 22:23                                 ` Danilo Krummrich
2026-02-24 22:44                                   ` Alexandre Belloni
2026-02-25  3:19                                     ` Gary Guo
2026-02-25 13:33                                   ` Rafael J. Wysocki
2026-02-25 16:26                                     ` Danilo Krummrich
2026-02-25 21:15                                       ` Rafael J. Wysocki
2026-02-26 12:28                                       ` Rafael J. Wysocki
2026-02-27 15:09                                       ` Benno Lossin
2026-02-22 12:25                 ` Rafael J. Wysocki
2026-02-22 14:24                   ` Rafael J. Wysocki
2026-02-22 15:29                   ` Danilo Krummrich
2026-02-22 15:43                     ` Rafael J. Wysocki
2026-02-21 16:32             ` Alvin Sun
2026-02-21 17:53             ` Danilo Krummrich
2026-01-16 16:22 ` [RFC PATCH v3 2/5] rust: add AMBA bus driver support Ke Sun
2026-01-16 16:22 ` [RFC PATCH v3 3/5] rust: add device wakeup capability support Ke Sun
2026-01-17  0:44   ` Ke Sun
2026-01-16 16:22 ` [RFC PATCH v3 4/5] rust: add RTC core abstractions and data structures Ke Sun
2026-01-16 16:34 ` [RFC PATCH v3 5/5] rust: add PL031 RTC driver Ke Sun
2026-01-19  9:12   ` Ke Sun

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