All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arina Kharlamova" <arina.kharlamova@mbzuai.ac.ae>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ASoC: tas2552: Fix runtime PM usage count underflow in probe
Date: Thu, 03 Dec 2026 11:34:14 +0000	[thread overview]
Message-ID: <sashiko-outbox-247675@kernel.org> (raw)
In-Reply-To: <20261203-tas2552-rpm-v2-1-7292beb88b1f@mbzuai.ac.ae>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ASoC: tas2552: missing pm_runtime_mark_last_busy() in
  tas2552_probe()
--

commit b92bf1fc547071c78df4015b0deecdfec98c7f8a
Author: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>

ASoC: tas2552: Fix runtime PM usage count underflow in probe

This commit removes the unbalanced pm_runtime_put_sync_autosuspend() call
in tas2552_probe() and disables runtime PM on the component registration
error path instead of calling pm_runtime_get_noresume().

> diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
> index 7fda383043ed5..0f0c6f1afde78 100644
> --- a/sound/soc/codecs/tas2552.c
> +++ b/sound/soc/codecs/tas2552.c
> @@ -746,7 +746,6 @@ static int tas2552_probe(struct i2c_client *client)
>  	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
>  	pm_runtime_use_autosuspend(&client->dev);
>  	pm_runtime_enable(&client->dev);
> -	pm_runtime_put_sync_autosuspend(&client->dev);

[Severity: Low]
Does removing pm_runtime_put_sync_autosuspend() leave dev->power.last_busy
at 0 and bypass the 1000 ms autosuspend delay?

Commit bbe5e3c433a3 ("ASoC: codecs: Remove redundant
pm_runtime_mark_last_busy() calls") dropped the explicit
pm_runtime_mark_last_busy() call here because
pm_runtime_put_sync_autosuspend() updated it internally.

Right after tas2552_probe() returns, __driver_probe_device() calls
pm_request_idle() -> rpm_idle() -> rpm_suspend().  With last_busy still 0
and uptime at least 1 second, pm_runtime_autosuspend_expiration() returns 0
and queues tas2552_runtime_suspend() immediately.

That contradicts the commit message's claim that the device stays active
after probe and causes an extra suspend/resume and regcache_sync() cycle
when the ASoC card binds.  Restoring pm_runtime_mark_last_busy(&client->dev)
before pm_runtime_enable() would preserve the 1000 ms autosuspend window.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-tas2552-rpm-v2-0-7292beb88b1f@mbzuai.ac.ae?part=1

  reply	other threads:[~2026-12-03 11:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 11:12 [PATCH v2 0/2] ASoC: tas2552: Fix runtime PM and supply refcounting Arina Kharlamova
2026-12-03 11:12 ` Arina Kharlamova via B4 Relay
2026-12-03 11:12 ` [PATCH v2 1/2] ASoC: tas2552: Fix runtime PM usage count underflow in probe Arina Kharlamova
2026-12-03 11:12   ` Arina Kharlamova via B4 Relay
2026-12-03 11:34   ` sashiko-bot [this message]
2026-12-03 11:12 ` [PATCH v2 2/2] ASoC: tas2552: Enable the supplies in the I2C probe Arina Kharlamova
2026-12-03 11:12   ` Arina Kharlamova via B4 Relay
2026-12-03 11:34   ` sashiko-bot

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=sashiko-outbox-247675@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=arina.kharlamova@mbzuai.ac.ae \
    --cc=linux-sound@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.