From: Markus Probst <markus.probst@posteo.de>
To: Danilo Krummrich <dakr@kernel.org>,
gregkh@linuxfoundation.org, rafael@kernel.org, ojeda@kernel.org,
boqun@kernel.org, gary@garyguo.net, bjorn3_gh@protonmail.com,
lossin@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com,
tmgross@umich.edu, beata.michalska@arm.com
Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH 1/2] rust: device: add BoundInternal device context and InternalBoundContext trait
Date: Mon, 29 Jun 2026 01:14:50 +0000 [thread overview]
Message-ID: <5ba4f96f57c1e096bd2d4e6c10e02b4d824f0634.camel@posteo.de> (raw)
In-Reply-To: <20260530132736.3298549-1-dakr@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]
On Sat, 2026-05-30 at 15:27 +0200, Danilo Krummrich wrote:
> Add a new BoundInternal device context type for cases where bus
> abstractions need access to internal device infrastructure, where
> CoreInternal would not be justified.
>
> Introduce the InternalBoundContext marker trait, implemented by both
> CoreInternal and BoundInternal, to allow methods that require internal
> bus abstraction access to a bound device to be generic over both
> contexts.
>
> The deref hierarchy now has two branches:
> - CoreInternal<'a> => Core<'a> => Bound => Normal
> - BoundInternal => Bound => Normal
>
> Update impl_device_context_deref! and impl_device_context_into_aref!
> macros to emit the BoundInternal => Bound deref and the corresponding
> ARef conversion.
>
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
> This is needed by both the serdev bus code [1] and the runtime PM series [2].
>
> [1] https://lore.kernel.org/driver-core/DIW1B4FUIXO7.28GSUA0CEA4EV@kernel.org/
> [2] https://lore.kernel.org/driver-core/DIKIJ81CV55B.3TA7PV8N4BN0E@kernel.org/
> ---
> rust/kernel/device.rs | 43 +++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 41 insertions(+), 2 deletions(-)
Reviewed-By: Markus Probst <markus.probst@posteo.de>
Thanks
- Markus Probst
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
next prev parent reply other threads:[~2026-06-29 1:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 13:27 Danilo Krummrich
2026-05-30 13:27 ` [PATCH 2/2] rust: device: move drvdata_borrow() to InternalBoundContext Danilo Krummrich
2026-06-29 1:16 ` Markus Probst
2026-06-29 1:14 ` Markus Probst [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-30 13:21 [PATCH 1/2] rust: device: add BoundInternal device context and InternalBoundContext trait 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=5ba4f96f57c1e096bd2d4e6c10e02b4d824f0634.camel@posteo.de \
--to=markus.probst@posteo.de \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=beata.michalska@arm.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@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
all inboxes | Powered by JetHome®