linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [RFC][PATCH] PM / Domains: Return -EPROBE_DEFER if we fail to init or turn-on domain
Date: Mon, 13 Jul 2015 14:06:40 +0100	[thread overview]
Message-ID: <55A3B7E0.8040401@nvidia.com> (raw)
In-Reply-To: <CAPDyKFrH_LFcLm_nbuu9z0=Q6eEV2SRF82nXKUPpF-CZgmR81Q@mail.gmail.com>


On 24/06/15 11:18, Ulf Hansson wrote:
> On 18 June 2015 at 19:52, Jon Hunter <jonathanh@nvidia.com> wrote:
>> When a device is probed, the function dev_pm_domain_attach() is called
>> to see if there is a power-domain that is associated with the device and
>> needs to be turned on. If dev_pm_domain_attach() does not return
>> -EPROBE_DEFER then the device will be probed.
>>
>> For devices using genpd, dev_pm_domain_attach() will call
>> genpd_dev_pm_attach(). If genpd_dev_pm_attach() does not find a power
>> domain associated with the device then it returns an error code not
>> equal to -EPROBE_DEFER to allow the device to be probed. However, if
>> genpd_dev_pm_attach() does find a power-domain that is associated with
>> the device, then it does not return -EPROBE_DEFER on failure and hence
>> the device will still be probed. Furthermore, genpd_dev_pm_attach() does
>> not check the error code returned by pm_genpd_poweron() to see if the
>> power-domain was turned on successfully.
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> 
> This is a clear improvement for genpd and as a short-term solution I
> am fine with this!
> 
> The long term solution should be to implement the
> pm_domain->activate|dismiss() callbacks, but that requires a bigger
> effort.
> 
> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Thanks Ulf.

Kevin, Rafael, are you ok with this?

Cheers
Jon

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

  reply	other threads:[~2015-07-13 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 17:52 [RFC][PATCH] PM / Domains: Return -EPROBE_DEFER if we fail to init or turn-on domain Jon Hunter
2015-06-24 10:18 ` Ulf Hansson
2015-07-13 13:06   ` Jon Hunter [this message]
2015-07-24 13:12     ` Jon Hunter
2015-07-24 20: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=55A3B7E0.8040401@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=khilman@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    /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).