linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: Something like devm_pm_runtime_enable desirable?
Date: Mon, 27 Nov 2017 02:21:10 +0100	[thread overview]
Message-ID: <CAJZ5v0g_vg+ojdZs7fNwyPF3RVOMWW0aHB9jDKTV0nt5ivP7_Q@mail.gmail.com> (raw)
In-Reply-To: <66504d0c-1b30-8b36-fd11-bd9abc2eb41a@gmail.com>

On Mon, Nov 27, 2017 at 12:13 AM, Heiner Kallweit <hkallweit1@gmail.com> wrote:
> I have a runtime pm enabled driver which uses device-managed resources
> only and therefore wouldn't need a remove callback. The remove callback
> does pm_runtime_disable only.
> Therefore I'm wondering whether something like devm_pm_runtime_enable
> would be desirable doing the pm_runtime_disable automagically.
>
> I can't really imagine that I'm the first one with this idea so I
> guess there is some reason why it doesn't exist yet ..

You also need to ensure that the device is left in the state in which
your driver will expect it to be in on the next probe in case the
driver module is unloaded and loaded again.  I'm not sure if devm_ can
do that generically enough.

Thanks,
Rafael

  reply	other threads:[~2017-11-27  1:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-26 23:13 Something like devm_pm_runtime_enable desirable? Heiner Kallweit
2017-11-27  1:21 ` Rafael J. Wysocki [this message]
2017-11-28 21:12   ` Heiner Kallweit
2017-11-28 22:04     ` Rafael J. Wysocki

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=CAJZ5v0g_vg+ojdZs7fNwyPF3RVOMWW0aHB9jDKTV0nt5ivP7_Q@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).