From: Jonathan Cameron <jic23@kernel.org>
To: Jean-Baptiste Maneyrol via B4 Relay
<devnull+jean-baptiste.maneyrol.tdk.com@kernel.org>
Cc: jean-baptiste.maneyrol@tdk.com,
"Remi Buisson" <remi.buisson@tdk.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] iio: imu: inv_icm45600: fix regulator put warning when probe fails
Date: Sun, 22 Feb 2026 13:25:47 +0000 [thread overview]
Message-ID: <20260222132547.34d4134e@jic23-huawei> (raw)
In-Reply-To: <20260217-inv-icm45600-fix-regulator-put-warning-v2-1-08ad62b1dcdb@tdk.com>
On Tue, 17 Feb 2026 11:44:50 +0100
Jean-Baptiste Maneyrol via B4 Relay <devnull+jean-baptiste.maneyrol.tdk.com@kernel.org> wrote:
> From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
>
> When the driver probe fails we encounter a regulator put warning
> because vddio regulator is not stopped before release. The issue
> comes from pm_runtime not already setup when core probe fails and
> the vddio regulator disable callback is called.
>
> Fix the issue by setting pm_runtime active early before vddio
> regulator resource cleanup. This requires to cut pm_runtime
> set_active and enable in 2 function calls.
>
> Fixes: 7ff021a3faca ("iio: imu: inv_icm45600: add new inv_icm45600 driver")
> Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> Cc: stable@vger.kernel.org
Applied to the fixes-togreg branch of iio.git.
Note I'll rebase that on rc1 once available and then spin a pull request.
Thanks,
Jonathan
> ---
> Changes in v2:
> - Rework patch to move pm_runtime set active early.
> - Requires to cut pm_runtime set active and enable in 2 functions.
> - Link to v1: https://lore.kernel.org/r/20260205-inv-icm45600-fix-regulator-put-warning-v1-1-314ec12512cb@tdk.com
> ---
> drivers/iio/imu/inv_icm45600/inv_icm45600_core.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
> index ab1cb7b9dba435a3280e50ab77cd16e903c7816c..811ff80a2e626b4c2bb7b718899abe77488c7745 100644
> --- a/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
> +++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
> @@ -744,6 +744,11 @@ int inv_icm45600_core_probe(struct regmap *regmap, const struct inv_icm45600_chi
> */
> fsleep(5 * USEC_PER_MSEC);
>
> + /* set pm_runtime active early for disable vddio resource cleanup */
> + ret = pm_runtime_set_active(dev);
> + if (ret)
> + return ret;
> +
> ret = inv_icm45600_enable_regulator_vddio(st);
> if (ret)
> return ret;
> @@ -776,7 +781,7 @@ int inv_icm45600_core_probe(struct regmap *regmap, const struct inv_icm45600_chi
> if (ret)
> return ret;
>
> - ret = devm_pm_runtime_set_active_enabled(dev);
> + ret = devm_pm_runtime_enable(dev);
> if (ret)
> return ret;
>
>
> ---
> base-commit: d820183f371d9aa8517a1cd21fe6edacf0f94b7f
> change-id: 20260205-inv-icm45600-fix-regulator-put-warning-7c45a49c4c53
>
> Best regards,
prev parent reply other threads:[~2026-02-22 13:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 10:44 Jean-Baptiste Maneyrol via B4 Relay
2026-02-22 13:25 ` 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=20260222132547.34d4134e@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=devnull+jean-baptiste.maneyrol.tdk.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=remi.buisson@tdk.com \
--cc=stable@vger.kernel.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
all inboxes | Powered by JetHome®