Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ASoC: tas2552: Fix runtime PM and supply refcounting
@ 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 via B4 Relay
  2026-12-03 11:12 ` [PATCH v2 2/2] ASoC: tas2552: Enable the supplies in the I2C probe Arina Kharlamova via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Arina Kharlamova via B4 Relay @ 2026-12-03 11:12 UTC (permalink / raw)
  To: Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Dinghao Liu
  Cc: linux-sound, Arina Kharlamova

Two refcounting fixes for tas2552. Patch 1 removes an unmatched runtime
PM put from the I2C probe, which warns about a usage count underflow on
every boot, and disables runtime PM when the probe fails. Patch 2 moves
the supply enable from the component probe to the I2C probe, so that
card rebinds no longer leak supply enables.

I found this with spec2patch. I model-checked the probe and remove paths
of the driver with CBMC against formal specifications of the kernel APIs
it calls. The specifications are checked against the kernel source, and
some of them are proved in Rocq against a transcription of the kernel
code. I also checked lock usage separately. With the help of an AI
coding assistant (Claude); I reviewed the analysis and the fix.
Compile-tested only, not tested on hardware.

I noticed the problem fixed in patch 2 while reviewing patch 1.

---
Changes in v2:
- Patch 2: enable the supplies in the I2C probe and disable them from a
  devm action instead of in tas2552_component_remove(), which cut the
  power while the device was still runtime active (Sashiko review).
- Link to v1: https://patch.msgid.link/20261201-tas2552-rpm-v1-0-2bac34f9f68f@mbzuai.ac.ae

---
Arina Kharlamova (2):
      ASoC: tas2552: Fix runtime PM usage count underflow in probe
      ASoC: tas2552: Enable the supplies in the I2C probe

 sound/soc/codecs/tas2552.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)
---
base-commit: fc7af56b230b39863ea6727449269057d85c5253
change-id: 20261201-tas2552-rpm-4d19db003214

Best regards,
--  
Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-03 11:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 11:12 [PATCH v2 0/2] ASoC: tas2552: Fix runtime PM and supply refcounting 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 via B4 Relay
2026-12-03 11:34   ` sashiko-bot
2026-12-03 11:12 ` [PATCH v2 2/2] ASoC: tas2552: Enable the supplies in the I2C probe Arina Kharlamova via B4 Relay
2026-12-03 11:34   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox