From: Beata Michalska <beata.michalska@arm.com>
To: Alice Ryhl <aliceryhl@google.com>
Cc: ojeda@kernel.org, dakr@kernel.org, gregkh@linuxfoundation.org,
rafael@kernel.org, boqun@kernel.org, gary@garyguo.net,
bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, tmgross@umich.edu,
daniel.almeida@collabora.com, boris.brezillon@collabora.com,
work@onurozkan.dev, samitolvanen@google.com, acourbot@nvidia.com,
rust-for-linux@vger.kernel.org, driver-core@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v4 2/3] rust: platform: wire runtime PM callbacks
Date: Mon, 19 Oct 2026 14:19:08 +0200 [thread overview]
Message-ID: <atYKvHQm9qJ9wY-e@arm.com> (raw)
In-Reply-To: <20261016121230.3724323-2-aliceryhl@google.com>
On Fri, Oct 16, 2026 at 12:12:30PM +0000, Alice Ryhl wrote:
> On Mon, Oct 05, 2026 at 03:37:40PM +0200, Beata Michalska wrote:
> > @@ -223,6 +225,14 @@ pub trait Driver {
> > /// The table of ACPI device ids supported by the driver.
> > const ACPI_ID_TABLE: Option<acpi::IdTable<Self::IdInfo>> = None;
> >
> > + /// Provides driver's PM callbacks, if any.
> > + fn dev_pm_ops() -> Option<crate::pm::DevPMOpsRef<'static, Adapter<Self>>>
> > + where
> > + Self: Sized,
> > + {
> > + None
> > + }
>
> Since `DevPMOps::pm_ops()` is a `const fn`, can this be an associated constant
> `const DEV_PM_OPS: Option<crate::pm::DevPMOpsRef<'static, Adapter<Self>>> = None;`
> to match `OF_ID_TABLE` and `ACPI_ID_TABLE` right above it?
>
It can, as long as no one would mind making the Driver trait sized.
---
BR
Beata
> Alice
next prev parent reply other threads:[~2026-10-19 12:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 13:37 [PATCH v4 0/3] Rust: add runtime PM support Beata Michalska
2026-10-05 13:37 ` [PATCH v4 1/3] rust: " Beata Michalska
2026-10-16 12:12 ` Alice Ryhl
2026-10-19 11:43 ` Beata Michalska
2026-10-05 13:37 ` [PATCH v4 2/3] rust: platform: wire runtime PM callbacks Beata Michalska
2026-10-16 12:12 ` Alice Ryhl
2026-10-19 12:19 ` Beata Michalska [this message]
2026-10-19 13:04 ` Alice Ryhl
2026-10-05 13:37 ` [PATCH v4 3/3 DO NOT MERGE] drm/tyr: enable runtime PM Beata Michalska
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=atYKvHQm9qJ9wY-e@arm.com \
--to=beata.michalska@arm.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.