The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: gregkh@linuxfoundation.org, rafael@kernel.org, ojeda@kernel.org,
	alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net,
	bjorn3_gh@protonmail.com, benno.lossin@proton.me,
	a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
	airlied@gmail.com, acourbot@nvidia.com, jhubbard@nvidia.com
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	Danilo Krummrich <dakr@kernel.org>
Subject: [PATCH v3 0/5] Auxiliary bus Rust abstractions
Date: Wed, 19 Mar 2025 21:33:52 +0100	[thread overview]
Message-ID: <20250319203455.132539-1-dakr@kernel.org> (raw)

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


             reply	other threads:[~2025-03-19 20:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 20:33 Danilo Krummrich [this message]
2025-03-19 20:33 ` [PATCH v3 1/5] rust: types: add `Opaque::zeroed` Danilo Krummrich
2025-03-20  8:37   ` Alice Ryhl
2025-03-19 20:33 ` [PATCH v3 2/5] driver: core: auxiliary: export auxiliary_bus_type Danilo Krummrich
2025-03-19 20:33 ` [PATCH v3 3/5] rust: auxiliary: add auxiliary device / driver abstractions Danilo Krummrich
2025-03-19 20:33 ` [PATCH v3 4/5] rust: auxiliary: add auxiliary registration Danilo Krummrich
2025-03-19 20:33 ` [PATCH v3 5/5] samples: rust: add Rust auxiliary driver sample Danilo Krummrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250319203455.132539-1-dakr@kernel.org \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox