Re: [PATCH v5 14/18] iio: magnetometer: ak8975: switch to using managed resources
From: Joshua Crofts
Date: Thu May 07 2026 - 08:24:19 EST
On Thu, 7 May 2026 at 14:12, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Thu, May 07, 2026 at 12:14:30PM +0200, Joshua Crofts wrote:
> > On Thu, 7 May 2026 at 12:09, Andy Shevchenko
> > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > > 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
>
> (Okay, this should be read as "pm_request_autosuspend()".)
>
> > > documentation says about, and that's correct, however it might be not so clear.
> >
> > Maybe I didn't look enough, but I couldn't find a definition of
> > pm_runtime_put_autosuspend()
> > that actually calls mark_last_busy().
>
> Hmm... It's just there.
>
> static inline int pm_runtime_put_autosuspend(struct device *dev)
> {
> pm_runtime_mark_last_busy(dev);
> return __pm_runtime_put_autosuspend(dev);
> }
>
> Even in pm_request_autosuspend().
How strange. I guess no changes then.
Thanks for the help!
--
Kind regards
CJD