* designware platdrv and runtime pm?
@ 2015-11-09 21:15 Wolfram Sang
2015-11-10 8:42 ` Jarkko Nikula
0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2015-11-09 21:15 UTC (permalink / raw)
To: linux-i2c; +Cc: Mika Westerberg, Jarkko Nikula, Andy Shevchenko
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
Hi guys,
while handling the merge conflict for the designware-platdrv, I noticed
an asymmetry in the runtime PM handling. Currently, code looks like
this:
if (dev->pm_runtime_disabled) {
pm_runtime_forbid(&pdev->dev);
} else {
pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
}
r = i2c_dw_probe(dev);
if (r) {
pm_runtime_disable(&pdev->dev);
return r;
}
But shouldn't the above error path (and the remove path) also take
dev->pm_runtime_disabled into account and act accordingly?
Thanks,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: designware platdrv and runtime pm?
2015-11-09 21:15 designware platdrv and runtime pm? Wolfram Sang
@ 2015-11-10 8:42 ` Jarkko Nikula
0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Nikula @ 2015-11-10 8:42 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c; +Cc: Mika Westerberg, Andy Shevchenko, David E. Box
On 09.11.2015 23:15, Wolfram Sang wrote:
> Hi guys,
>
> while handling the merge conflict for the designware-platdrv, I noticed
> an asymmetry in the runtime PM handling. Currently, code looks like
> this:
>
> if (dev->pm_runtime_disabled) {
> pm_runtime_forbid(&pdev->dev);
> } else {
> pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
> pm_runtime_use_autosuspend(&pdev->dev);
> pm_runtime_set_active(&pdev->dev);
> pm_runtime_enable(&pdev->dev);
> }
>
> r = i2c_dw_probe(dev);
> if (r) {
> pm_runtime_disable(&pdev->dev);
> return r;
> }
>
> But shouldn't the above error path (and the remove path) also take
> dev->pm_runtime_disabled into account and act accordingly?
>
I think you are right. Which brings another question to my mind do we
need to have a patch to linux-stable too?
David: Your original commit 894acb2f823b ("i2c: designware: Add Intel
Baytrail PMIC I2C bus support") doesn't add pm_runtime_disabled test to
dw_i2c_remove(). I guess there is possibility power down the shared
controller by having CONFIG_I2C_DESIGNWARE_PLATFORM=m and then unloading
the driver?
--
Jarkko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-10 8:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 21:15 designware platdrv and runtime pm? Wolfram Sang
2015-11-10 8:42 ` Jarkko Nikula
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.