* [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
@ 2026-05-06 8:27 Andy Shevchenko
2026-05-06 8:32 ` Andy Shevchenko
2026-05-06 13:27 ` Maxwell Doose
0 siblings, 2 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-05-06 8:27 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio, linux-kernel
Cc: David Lechner, Nuno Sá, Andy Shevchenko, Maxwell Doose,
joshua.crofts1, Andy Shevchenko, Sashiko
On the failure in the ak8975_read_axis() the PM runtime gets unbalanced.
Balance it by calling pm_runtime_put_autosuspend() on error path as well.
Fixes: cde4cb5dd422 ("iio: magn: ak8975: deploy runtime and system PM")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260505-magnetometer-fixes-v5-0-831b9b5550fc%40gmail.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/iio/magnetometer/ak8975.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index b648b0afa573..b3468756bdf1 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -784,6 +784,7 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)
exit:
mutex_unlock(&data->lock);
+ pm_runtime_put_autosuspend(&data->client->dev);
dev_err(&client->dev, "Error in reading axis\n");
return ret;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
2026-05-06 8:27 [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call Andy Shevchenko
@ 2026-05-06 8:32 ` Andy Shevchenko
2026-05-06 8:45 ` Joshua Crofts
2026-05-06 13:27 ` Maxwell Doose
1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2026-05-06 8:32 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio, linux-kernel
Cc: David Lechner, Nuno Sá, Andy Shevchenko, Maxwell Doose,
joshua.crofts1, Sashiko
On Wed, May 06, 2026 at 10:27:55AM +0200, Andy Shevchenko wrote:
> On the failure in the ak8975_read_axis() the PM runtime gets unbalanced.
> Balance it by calling pm_runtime_put_autosuspend() on error path as well.
I hope Jonathan will take this soon, so you, Joshua, can base a new version on
this one (otherwise it will be a conflict with one change).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
2026-05-06 8:32 ` Andy Shevchenko
@ 2026-05-06 8:45 ` Joshua Crofts
2026-05-06 17:15 ` Jonathan Cameron
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Crofts @ 2026-05-06 8:45 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jonathan Cameron, linux-iio, linux-kernel, David Lechner,
Nuno Sá, Andy Shevchenko, Maxwell Doose, Sashiko
On Wed, 6 May 2026 at 10:32, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Wed, May 06, 2026 at 10:27:55AM +0200, Andy Shevchenko wrote:
> > On the failure in the ak8975_read_axis() the PM runtime gets unbalanced.
> > Balance it by calling pm_runtime_put_autosuspend() on error path as well.
>
> I hope Jonathan will take this soon, so you, Joshua, can base a new version on
> this one (otherwise it will be a conflict with one change).
Considering this is a fix, I'd say it will be merged fairly soon. I'll
fix the addressed
changes, and then do a rebase once it's available.
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
--
Kind regards
CJD
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
2026-05-06 8:27 [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call Andy Shevchenko
2026-05-06 8:32 ` Andy Shevchenko
@ 2026-05-06 13:27 ` Maxwell Doose
1 sibling, 0 replies; 5+ messages in thread
From: Maxwell Doose @ 2026-05-06 13:27 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jonathan Cameron, linux-iio, linux-kernel, David Lechner,
Nuno Sá, Andy Shevchenko, joshua.crofts1, Sashiko
On Wed, May 6, 2026 at 3:28 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On the failure in the ak8975_read_axis() the PM runtime gets unbalanced.
> Balance it by calling pm_runtime_put_autosuspend() on error path as well.
>
> Fixes: cde4cb5dd422 ("iio: magn: ak8975: deploy runtime and system PM")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://sashiko.dev/#/patchset/20260505-magnetometer-fixes-v5-0-831b9b5550fc%40gmail.com
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/iio/magnetometer/ak8975.c | 1 +
> 1 file changed, 1 insertion(+)
>
[snip]
>
Looks fine to me but I'm not in a position to give a formal rb, as I
can't compile-test it right now. If Jonathan gives it the green light
then if he wants he can add my tag but that's at his discretion and
not totally necessary since Joshua already gave his rb.
best regards,
max
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
2026-05-06 8:45 ` Joshua Crofts
@ 2026-05-06 17:15 ` Jonathan Cameron
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2026-05-06 17:15 UTC (permalink / raw)
To: Joshua Crofts
Cc: Andy Shevchenko, linux-iio, linux-kernel, David Lechner,
Nuno Sá, Andy Shevchenko, Maxwell Doose, Sashiko
On Wed, 6 May 2026 10:45:56 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> On Wed, 6 May 2026 at 10:32, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Wed, May 06, 2026 at 10:27:55AM +0200, Andy Shevchenko wrote:
> > > On the failure in the ak8975_read_axis() the PM runtime gets unbalanced.
> > > Balance it by calling pm_runtime_put_autosuspend() on error path as well.
> >
> > I hope Jonathan will take this soon, so you, Joshua, can base a new version on
> > this one (otherwise it will be a conflict with one change).
>
> Considering this is a fix, I'd say it will be merged fairly soon. I'll
> fix the addressed
> changes, and then do a rebase once it's available.
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
>
I'm going to be a tiny bit naughty with this one because I don't want to have
your larger series sitting around for longer - my ability to keep up with what
is in flight is failing me this week so I want to trim that down!
Snuck underneath the parts of your series I picked up on the testing
branch of iio.git. It can get backported after next merge window.
Marked for stable.
Thanks
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-06 17:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 8:27 [PATCH v1 1/1] iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call Andy Shevchenko
2026-05-06 8:32 ` Andy Shevchenko
2026-05-06 8:45 ` Joshua Crofts
2026-05-06 17:15 ` Jonathan Cameron
2026-05-06 13:27 ` Maxwell Doose
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox