Re: [PATCH 3/8] iio: magnetometer: ak8975: switch to using managed resources
From: Joshua Crofts
Date: Tue May 12 2026 - 04:13:25 EST
On Tue, 12 May 2026 at 10:06, Nuno Sá <noname.nuno@xxxxxxxxx> wrote:
> > This is to prevent a resource leak. If we register the power_off
> > function at the end,
> > any potential probe() failures will leave the regulators on.
>
> Okay it does make sense! I now see the action is registered after
> ak8975_power_on() which what makes sense. Still would like to avoid that
> weird pm_runtime_set_active() call. It would be nice if we could
> guarantee through PM that the device get's suspended on unbind. Oh well,
> I guess this is ok.
FYI, there is a new version where I addressed some of your comments.
https://lore.kernel.org/linux-iio/20260511-magnetometer-fixes-post-pickup-v7-3-9d910faa28b6@xxxxxxxxx/T/#u
--
Kind regards
CJD