[PATCH v3 0/5] Auxiliary bus Rust abstractions

Danilo Krummrich posted 5 patches 9 months ago
There is a newer version of this series
MAINTAINERS                           |   2 +
drivers/base/auxiliary.c              |   3 +-
include/linux/auxiliary_bus.h         |   2 +
rust/bindings/bindings_helper.h       |   1 +
rust/helpers/auxiliary.c              |  23 ++
rust/helpers/helpers.c                |   1 +
rust/kernel/auxiliary.rs              | 383 ++++++++++++++++++++++++++
rust/kernel/lib.rs                    |   2 +
rust/kernel/types.rs                  |   8 +
samples/rust/Kconfig                  |  12 +
samples/rust/Makefile                 |   1 +
samples/rust/rust_driver_auxiliary.rs | 110 ++++++++
12 files changed, 547 insertions(+), 1 deletion(-)
create mode 100644 rust/helpers/auxiliary.c
create mode 100644 rust/kernel/auxiliary.rs
create mode 100644 samples/rust/rust_driver_auxiliary.rs
[PATCH v3 0/5] Auxiliary bus Rust abstractions
Posted by Danilo Krummrich 9 months ago
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.

This patch series depends on patches queued for v6.15-rc1 from different trees
(driver-core, nova), plus the patches in [1]; a branch containing the patches,
including the dependencies can be found in [2].

[1] https://lore.kernel.org/lkml/20250319203112.131959-1-dakr@kernel.org/
[2] https://web.git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/log/?h=rust/auxiliary

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`
  driver: core: auxiliary: export auxiliary_bus_type
  rust: auxiliary: add auxiliary device / driver abstractions
  rust: auxiliary: add auxiliary registration
  samples: rust: add Rust auxiliary driver sample

 MAINTAINERS                           |   2 +
 drivers/base/auxiliary.c              |   3 +-
 include/linux/auxiliary_bus.h         |   2 +
 rust/bindings/bindings_helper.h       |   1 +
 rust/helpers/auxiliary.c              |  23 ++
 rust/helpers/helpers.c                |   1 +
 rust/kernel/auxiliary.rs              | 383 ++++++++++++++++++++++++++
 rust/kernel/lib.rs                    |   2 +
 rust/kernel/types.rs                  |   8 +
 samples/rust/Kconfig                  |  12 +
 samples/rust/Makefile                 |   1 +
 samples/rust/rust_driver_auxiliary.rs | 110 ++++++++
 12 files changed, 547 insertions(+), 1 deletion(-)
 create mode 100644 rust/helpers/auxiliary.c
 create mode 100644 rust/kernel/auxiliary.rs
 create mode 100644 samples/rust/rust_driver_auxiliary.rs

-- 
2.48.1