From nobody Thu Apr 2 23:16:44 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20367ECAAD3 for ; Mon, 19 Sep 2022 17:35:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231214AbiISRf0 (ORCPT ); Mon, 19 Sep 2022 13:35:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231132AbiISRfS (ORCPT ); Mon, 19 Sep 2022 13:35:18 -0400 Received: from hutie.ust.cz (unknown [IPv6:2a03:3b40:fe:f0::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 297E337F9D for ; Mon, 19 Sep 2022 10:35:02 -0700 (PDT) From: =?UTF-8?q?Martin=20Povi=C5=A1er?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1663608899; bh=d7mgKUnVCfrgkyGqmQzUJTvvGo3IZOIgUBZZ0DNTb8Q=; h=From:To:Cc:Subject:Date; b=Xg+liSKcnXx0197eHUxd/Uj9XdbE8M9EHtbSry38u4R02iAoyBeA5XNucQRba4liV /aV6rfGgdN7z8d5XnKEeYFYpihTrHzybfRvEWGDt/7QjtLFfp5QY2ZLZpw8y7T5BJB iS/9Urv3RPVoBaPfM4Z4IMotfYuLqGvFKt0mqDNo= To: Liam Girdwood , Mark Brown Cc: navada@ti.com, Charles Keepax , Stephen Kitt , Dan Murphy , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Martin=20Povi=C5=A1er?= Subject: [PATCH] ASoC: tas2770: Reinit regcache on reset Date: Mon, 19 Sep 2022 19:34:53 +0200 Message-Id: <20220919173453.84292-1-povik+lin@cutebit.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On probe of the ASoC component, the device is reset but the regcache is retained. This means the regcache gets out of sync if the codec is rebound to a sound card for a second time. Fix it by reinitializing the regcache to defaults after the device is reset. Fixes: b0bcbe615756 ("ASoC: tas2770: Fix calling reset in probe") Signed-off-by: Martin Povi=C5=A1er --- sound/soc/codecs/tas2770.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index bb653b664146..b6765235a4b3 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -495,6 +495,8 @@ static struct snd_soc_dai_driver tas2770_dai_driver[] = =3D { }, }; =20 +static const struct regmap_config tas2770_i2c_regmap; + static int tas2770_codec_probe(struct snd_soc_component *component) { struct tas2770_priv *tas2770 =3D @@ -508,6 +510,7 @@ static int tas2770_codec_probe(struct snd_soc_component= *component) } =20 tas2770_reset(tas2770); + regmap_reinit_cache(tas2770->regmap, &tas2770_i2c_regmap); =20 return 0; } --=20 2.33.0