rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Auxiliary bus Rust abstractions
@ 2025-04-14 13:18 Danilo Krummrich
  2025-04-14 13:18 ` [PATCH v4 1/5] rust: types: add `Opaque::zeroed` Danilo Krummrich
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Danilo Krummrich @ 2025-04-14 13:18 UTC (permalink / raw)
  To: gregkh, rafael, david.m.ertman, ira.weiny, ojeda, alex.gaynor,
	boqun.feng, gary, bjorn3_gh, benno.lossin, a.hindborg, aliceryhl,
	tmgross, airlied, acourbot, jhubbard
  Cc: linux-kernel, rust-for-linux, Danilo Krummrich

This series adds Rust abstractions for the auxiliary bus.

It implements the required abstractions to write auxiliary drivers and create
auxiliary device registrations. A driver sample illustrates how the
corresponding abstractions work.

The auxiliary abstractions are required for the Nova driver project, in order to
connect nova-core with the nova-drm driver.

A branch containing the patches can be found in [1].

[1] https://web.git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/log/?h=rust/auxiliary

Changes in v4:
  - drop TryFrom<&Device> for &auxiliary::Device for now; we likely don't need
    it anytime soon
  - sample: rename PciDriver to ParentDriver; add connect() to ParentDriver
  - rebase onto https://lore.kernel.org/rust-for-linux/20250413173758.12068-1-dakr@kernel.org/

Changes in v3:
  - export auxiliary_bus_type
  - implement impl TryFrom<&Device> for &auxiliary::Device
  - implement Send + Sync for Registration and Device

Changes in v2:
  - implement bus device soundness improvements from [2]

Danilo Krummrich (5):
  rust: types: add `Opaque::zeroed`
  rust: device: implement Device::parent()
  rust: auxiliary: add auxiliary device / driver abstractions
  rust: auxiliary: add auxiliary registration
  samples: rust: add Rust auxiliary driver sample

 MAINTAINERS                           |   3 +
 rust/bindings/bindings_helper.h       |   1 +
 rust/helpers/auxiliary.c              |  23 ++
 rust/helpers/helpers.c                |   1 +
 rust/kernel/auxiliary.rs              | 360 ++++++++++++++++++++++++++
 rust/kernel/device.rs                 |  18 ++
 rust/kernel/lib.rs                    |   2 +
 rust/kernel/types.rs                  |   8 +
 samples/rust/Kconfig                  |  12 +
 samples/rust/Makefile                 |   1 +
 samples/rust/rust_driver_auxiliary.rs | 122 +++++++++
 11 files changed, 551 insertions(+)
 create mode 100644 rust/helpers/auxiliary.c
 create mode 100644 rust/kernel/auxiliary.rs
 create mode 100644 samples/rust/rust_driver_auxiliary.rs

-- 
2.49.0


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

end of thread, other threads:[~2025-04-19 13:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 13:18 [PATCH v4 0/5] Auxiliary bus Rust abstractions Danilo Krummrich
2025-04-14 13:18 ` [PATCH v4 1/5] rust: types: add `Opaque::zeroed` Danilo Krummrich
2025-04-15 11:59   ` Alice Ryhl
2025-04-15 12:43     ` Danilo Krummrich
2025-04-15 15:17       ` Miguel Ojeda
2025-04-14 13:18 ` [PATCH v4 2/5] rust: device: implement Device::parent() Danilo Krummrich
2025-04-14 13:18 ` [PATCH v4 3/5] rust: auxiliary: add auxiliary device / driver abstractions Danilo Krummrich
2025-04-15 12:08   ` Alice Ryhl
2025-04-15 12:45     ` Danilo Krummrich
2025-04-14 13:18 ` [PATCH v4 4/5] rust: auxiliary: add auxiliary registration Danilo Krummrich
2025-04-15 12:11   ` Alice Ryhl
2025-04-15 12:50     ` Danilo Krummrich
2025-04-16 10:38       ` Alice Ryhl
2025-04-14 13:18 ` [PATCH v4 5/5] samples: rust: add Rust auxiliary driver sample Danilo Krummrich
2025-04-15 11:38 ` [PATCH v4 0/5] Auxiliary bus Rust abstractions Greg KH
2025-04-15 12:42   ` Danilo Krummrich
2025-04-15 12:54     ` Greg KH
2025-04-19 13:01 ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).