From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Shuhao Fu" <sfual@cse.ust.hk>, "Chen-Yu Tsai" <wens@csie.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Samuel Holland" <samuel@sholland.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: Fix pm runtime clean-up in sun4i_gpadc_probe
Date: Sun, 12 Oct 2025 18:52:16 +0100 [thread overview]
Message-ID: <20251012185216.6268c201@jic23-huawei> (raw)
In-Reply-To: <CAHp75VdKLoCyYHZsEpkmXNJQ5QSpA_crrWR+MS4-=xmn=g9azw@mail.gmail.com>
On Wed, 8 Oct 2025 19:57:47 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Wed, Oct 8, 2025 at 7:52 PM Shuhao Fu <sfual@cse.ust.hk> wrote:
> >
> > In `sun4i_gpadc_probe`, in case of thermal register failure, the runtime
> > PM usage counter would not be decreased, resulting in a possible
> > inconsistency of runtime PM state.
> >
> > Fixes: b0a242894f11 ("iio: adc: sun4i-gpadc-iio: register in the thermal after registering in pm")
>
> This might fix this problem, but it doesn't fix the whole mess in the
> probe with devm/non-devm ordering.
>
Mostly this looks simple to fix. Starting with devm_iio_map_register() instead
of the non devm version.
Then devm_pm_runtime_enable(). However, I have no idea why we need a pm_runtime_put()
in the exit path. Maybe it's messing with the parent power? There isn't a matching
get.
Anyone have this hardware to hand for testing if we try to fix this up fully?
Jonathan
prev parent reply other threads:[~2025-10-12 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 16:51 [PATCH] iio: adc: Fix pm runtime clean-up in sun4i_gpadc_probe Shuhao Fu
2025-10-08 16:57 ` Andy Shevchenko
2025-10-12 17:52 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251012185216.6268c201@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=nuno.sa@analog.com \
--cc=samuel@sholland.org \
--cc=sfual@cse.ust.hk \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox