[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1603111336100.1840-100000@iolanthe.rowland.org>
Date: Fri, 11 Mar 2016 13:46:12 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>
cc: Ulf Hansson <ulf.hansson@...aro.org>,
Kevin Hilman <khilman@...aro.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] Device unbound in a resumed state
On Fri, 11 Mar 2016, Krzysztof Kozlowski wrote:
> Hi,
>
>
> Could be related (the same?) with [0].
>
> I have a driver (hwrng/exynos-rng) which in probe does:
> pm_runtime_set_autosuspend_delay(&pdev->dev, EXYNOS_AUTOSUSPEND_DELAY);
> pm_runtime_use_autosuspend(&pdev->dev);
> pm_runtime_enable(&pdev->dev);
>
> and in remove:
> pm_runtime_disable(&pdev->dev)
But not pm_runtime_dont_use_autosuspend()?
Why disable runtime PM if you want the runtime-PM methods to put the
device into a low-power state?
> Just before unbinding in __device_release_driver() the device is resumed
> but unfortunately not suspended later. I mean the
> __device_release_driver()->pm_runtime_put_sync() does not trigger
> runtime suspend.
Because autosuspend is still in use at this point.
> This leads to leaving the device in active state (e.g. clocks enabled).
>
> It does not happen after removal of autosuspend. Also runtime suspend
> happens after very fast unbind-bind.
Overall it sounds like the system is behaving the way it is supposed
to.
But maybe we should make pm_runtime_use_autosuspend() call
pm_runtime_mark_last_busy(), to avoid the unbind - bind - immediate
autosuspend behavior.
Alan Stern
Powered by blists - more mailing lists