]> git.hungrycats.org Git - linux/commit
ASoC: adau1372: Clear PLL_EN on failed PLL lock without reset GPIO
authorGuangshuo Li <lgs201920130244@gmail.com>
Thu, 4 Jun 2026 12:55:20 +0000 (20:55 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 12 Jun 2026 17:26:05 +0000 (18:26 +0100)
commit69b4141b428bcf2cf7a863950c0d6e5c5ae89ac1
tree5aa27f47b0cdb5e5d4fb31d71a045bc689956b11
parent7165d138c6e71a6b7845eff83ca8be8e129f8bff
ASoC: adau1372: Clear PLL_EN on failed PLL lock without reset GPIO

The PLL lock failure path in adau1372_set_power() unwinds by putting
the regmap back in cache-only mode, asserting the optional power-down
GPIO and disabling mclk.

adau1372_enable_pll() enables CLK_CTRL.PLL_EN before polling the PLL
lock bit. If the lock fails on a board without a power-down GPIO, the
error path disables mclk and returns an error, but leaves PLL_EN set in
the hardware register. The normal power-off path already handles the
no-GPIO case by explicitly clearing PLL_EN.

Mirror that cleanup in the PLL lock failure path and clear PLL_EN while
the regmap is still live, before switching it back to cache-only mode.

Fixes: bfe6a264effc ("ASoC: adau1372: Fix clock leak on PLL lock failure")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Link: https://patch.msgid.link/20260604125520.1428905-1-lgs201920130244@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/adau1372.c