Re: [RFC][PATCH] PM / Domains: Return -EPROBE_DEFER if we fail to init or turn-on domain
From: Jon Hunter <jonathanh@nvidia.com>
Date: 2015-07-13 13:06:46
On 24/06/15 11:18, Ulf Hansson wrote:
On 18 June 2015 at 19:52, Jon Hunter [off-list ref] wrote:quoted
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 <redacted>
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. -----------------------------------------------------------------------------------