From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Johan Hovold <johan@kernel.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH] driver core: Call pm_runtime_put_sync() only after device_remove()
Date: Wed, 17 May 2023 11:55:27 +0200 [thread overview]
Message-ID: <20230517-amigo-depth-00436cd21520-mkl@pengutronix.de> (raw)
In-Reply-To: <ZGSQEapCl5HfQpY8@hovoldconsulting.com>
[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]
On 17.05.2023 10:28:01, Johan Hovold wrote:
> Right, but we do have drivers that have CONFIG_PM as an explicit
> dependency.
>
> > In the end something like 72362dcdf654 ("can: mcp251xfd:
> > mcp251xfd_unregister(): simplify runtime PM handling") might be an
> > approach. But IMHO it's more complicated than it should be and honestly
> > I'm not sure if it's safe and correct this way.
>
> Yeah, unfortunately runtime PM is fairly underspecified so we end up
> with this multitude of implementations, many of which are broken in
> various ways. A smaller API with documented best-practices may have
> helped, but that's not where we are right now.
>
> Looks like 72362dcdf654 ("can: mcp251xfd: mcp251xfd_unregister():
> simplify runtime PM handling") introduces yet another way to do things,
> and which will break if anyone enables (or tries to use this pattern in
> another driver with) autosuspend...
ACK - I think in that driver it works, as the runtime PM is resumed
during interface up and suspended in interface down. IMHO autosuspend
would not bring any benefits here...
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-05-17 9:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 7:34 Uwe Kleine-König
2023-05-11 10:18 ` Rafael J. Wysocki
2023-05-11 10:39 ` Uwe Kleine-König
2023-05-11 11:48 ` Johan Hovold
2023-05-11 14:44 ` Rafael J. Wysocki
2023-05-12 7:40 ` Johan Hovold
2023-05-12 14:04 ` Rafael J. Wysocki
2023-05-12 15:00 ` Johan Hovold
2023-05-12 15:04 ` Rafael J. Wysocki
2023-05-12 18:49 ` Uwe Kleine-König
2023-05-17 8:28 ` Johan Hovold
2023-05-17 9:55 ` Marc Kleine-Budde [this message]
2023-05-11 14:46 ` Uwe Kleine-König
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=20230517-amigo-depth-00436cd21520-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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®