Re: [PATCH v5 14/18] iio: magnetometer: ak8975: switch to using managed resources
From: Andy Shevchenko
Date: Thu May 07 2026 - 06:10:17 EST
On Thu, May 07, 2026 at 11:19:32AM +0200, Joshua Crofts wrote:
> On Wed, 6 May 2026 at 19:09, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> > On Tue, 05 May 2026 13:46:10 +0200
> > Joshua Crofts via B4 Relay <devnull+joshua.crofts1.gmail.com@xxxxxxxxxx> wrote:
...
> I'd just add pm_runtime_mark_last_busy() and pm_request_autosuspend() here
> to make the device suspend.
pm_runtime_put_autosuspend() is exactly doing that in one call. That's what
documentation says about, and that's correct, however it might be not so clear.
> Perhaps unrelated, however I found an issue with the pm_runtime documentation,
> as it incorrectly says that pm_runtime_mark_last_busy() is always called with an
> autosuspend function (which is not the case, looking at the definition).
>
> "Drivers may also continue to use the non-autosuspend helper
> functions; they will
> behave normally, which means sometimes taking the autosuspend delay into
> account (see pm_runtime_idle). The autosuspend variants of the
> functions also call
> pm_runtime_mark_last_busy()."
--
With Best Regards,
Andy Shevchenko