From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5011A41DE0E; Tue, 21 Jul 2026 19:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662186; cv=none; b=F4p/ZZ6z5rTrIk+LmvqnYniwICc32Kckmp3DrYVVzQ9ytmGBD2j+4VqHHVEMWiiHlqpPgm9Dbnvaul3F2pRux+JIx5l0FI+9h+Y9xZ4z7C1m8de4A6o1olnCafxAZRmfDbOc3xkq38hvu3PJc23bm7nfrDVqzZ8e+h70MYFLCYE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662186; c=relaxed/simple; bh=fmWaGc6EL4aoA1yuqtYkdGWDRHCiI0MLD1dEsNXCNls=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GJqsfGXzLVsqMuppC+4V8WLJfNJAH9Gpt+UtnRvCm1xe5Oy6H04ap8HOdWuNfhOefwrdSQeOMmvF7Ntfh/QcSgBh26nc5ZLpccVN3yIkA7zR51sLpycz3gbIKlW5UJ4PN93irriJcJJ1UUmdH+JMOoNfWdbWX1LEpvrunaBhmDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MKf40ZXz; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MKf40ZXz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B69731F000E9; Tue, 21 Jul 2026 19:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784662185; bh=+M5IHjz8forxm9nxjUEiZimczpu3GAMg0UxYWgZAzDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MKf40ZXzzhCh8VuNpR0UcFe+Jq95GBUyOJ4pEu4mSTSx2EHx0yVh0mUEj8f58Isk6 a6npTxJi/jqVbP56cL6XMiOZrYziUpBFqt6zyvUKjyWBOCtOcT2YqDA2SQTtoGZuWS xAOImnkhzaTRCLMY3Pa2wOfZSA4TtjRgezEUTrXg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guangshuo Li , Mark Brown , Sasha Levin Subject: [PATCH 6.12 0349/1276] ASoC: adau1372: Clear PLL_EN on failed PLL lock without reset GPIO Date: Tue, 21 Jul 2026 17:13:12 +0200 Message-ID: <20260721152453.923897641@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guangshuo Li [ Upstream commit 69b4141b428bcf2cf7a863950c0d6e5c5ae89ac1 ] 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 Link: https://patch.msgid.link/20260604125520.1428905-1-lgs201920130244@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/adau1372.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/codecs/adau1372.c b/sound/soc/codecs/adau1372.c index 25f123110b5be4..7dc0b5c79e3998 100644 --- a/sound/soc/codecs/adau1372.c +++ b/sound/soc/codecs/adau1372.c @@ -812,6 +812,11 @@ static int adau1372_set_power(struct adau1372 *adau1372, bool enable) if (adau1372->use_pll) { ret = adau1372_enable_pll(adau1372); if (ret) { + if (!adau1372->pd_gpio) + regmap_update_bits(adau1372->regmap, + ADAU1372_REG_CLK_CTRL, + ADAU1372_CLK_CTRL_PLL_EN, + 0); regcache_cache_only(adau1372->regmap, true); if (adau1372->pd_gpio) gpiod_set_value(adau1372->pd_gpio, 1); -- 2.53.0