Skip to content

Auxiliary bus Rust abstractions

Danilo Krummrich lkml rust-for-linux 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 12 repliesIn review
  2. v35 patches 1 replySuperseded
  3. v24 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches2 repliesSuperseded

Changes in v4 from the cover letter

- 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/[email protected]/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rust: types: add `Opaque::zeroed`rust/kernel/types.rs+8 -03 replies
2/5rust: device: implement Device::parent()rust/kernel/device.rs+19 -00 replies
3/5rust: auxiliary: add auxiliary device / driver abstractionsMAINTAINERS rust/bindings/bindings_helper.h rust/helpers/auxiliary.c +4 more+303 -12 replies
4/5rust: auxiliary: add auxiliary registrationrust/kernel/auxiliary.rs+87 -13 replies
5/5samples: rust: add Rust auxiliary driver sampleMAINTAINERS samples/rust/Kconfig samples/rust/Makefile +1 more+136 -00 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchGreg Kroah-HartmanAlice RyhlMiguel Ojeda
1/5A-b R-b A-b
2/5R-b
3/5A-b R-b
4/5A-b R-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/5] Auxiliary bus Rust abstractions

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/[email protected]/

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
Signature · 1 line
2.49.0