Rust for Linux List
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Rust: add runtime PM support
@ 2026-05-14 15:09 Beata Michalska
  2026-05-14 15:09 ` [RFC PATCH 1/3] rust: Add " Beata Michalska
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Beata Michalska @ 2026-05-14 15:09 UTC (permalink / raw)
  To: Miguel Ojeda, Danilo Krummrich, Greg Kroah-Hartman,
	Rafael J . Wysocki
  Cc: Boqun Feng, Gary Guo, Bjorn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Daniel Almeida,
	Boris Brezillon, rust-for-linux, driver-core, linux-kernel

This series adds initial runtime PM support for Rust drivers.

The concept for Rust abstraction gets introduced in the first patch
in this series. It provides generated dev_pm_ops callbacks for runtime
suspend/resume, tracking runtime PM state, and allowing drivers to carry
custom state across transitions. It also introduces helper types for
common usage patterns and basic PM configuration.

Second one integrates dev_pm_ops into the Rust platform driver abstraction,
enabling drivers to register PM callbacks with the core.

The last in the series is provided for demonstrative purposes
(not intended to be an actual merge material).

This has been lightly tested with the Tyr driver.


Beata Michalska (3):
  rust: Add runtime PM support
  rust/platform: Add support for runtime PM
  drm/tyr: wire runtime PM hooks

 drivers/gpu/drm/tyr/driver.rs   | 123 ++++-
 drivers/gpu/drm/tyr/file.rs     |   3 +
 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/helpers.c          |   1 +
 rust/helpers/pm_runtime.c       |  38 ++
 rust/kernel/lib.rs              |   1 +
 rust/kernel/platform.rs         |  18 +
 rust/kernel/pm.rs               | 924 ++++++++++++++++++++++++++++++++
 8 files changed, 1086 insertions(+), 23 deletions(-)
 create mode 100644 rust/helpers/pm_runtime.c
 create mode 100644 rust/kernel/pm.rs

-- 
2.43.0


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

end of thread, other threads:[~2026-05-14 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 15:09 [RFC PATCH 0/3] Rust: add runtime PM support Beata Michalska
2026-05-14 15:09 ` [RFC PATCH 1/3] rust: Add " Beata Michalska
2026-05-14 15:09 ` [RFC PATCH 2/3] rust/platform: Add support for runtime PM Beata Michalska
2026-05-14 15:09 ` [RFC PATCH 3/3] [DO NOT MERGE] drm/tyr: wire runtime PM hooks Beata Michalska

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