From nobody Sun Dec 14 06:22:10 2025 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 1F1FDC433FE for ; Mon, 3 Oct 2022 07:36:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbiJCHgY (ORCPT ); Mon, 3 Oct 2022 03:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231858AbiJCHeo (ORCPT ); Mon, 3 Oct 2022 03:34:44 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A9944A120; Mon, 3 Oct 2022 00:22:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 5E7A2CE0B20; Mon, 3 Oct 2022 07:18:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DD17C433D6; Mon, 3 Oct 2022 07:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781519; bh=LgYd5uDMmkFHpbHdPXme4CTyzsOyBHSL0NHl2ISCDDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z7BN0S8uaogN4tPMVlQOJT1DxQ5fk/i6peQLFL4VUNXjduQS2G79j2oWD9XZhP9zT 9hqbNma64RqQQZwtAFM2uIXpDQ1FoYHwwC9sZ6k1BMyoiCJ2NVL8flh0mjT4L1IZzE oLSRg+sWXFHHoHKe9yy39gr/iZ208I0Y3mUYr5Hg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Martin=20Povi=C5=A1er?= , Mark Brown , Sasha Levin Subject: [PATCH 5.15 49/83] ASoC: tas2770: Reinit regcache on reset Date: Mon, 3 Oct 2022 09:11:14 +0200 Message-Id: <20221003070723.229603330@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070721.971297651@linuxfoundation.org> References: <20221003070721.971297651@linuxfoundation.org> User-Agent: quilt/0.67 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 From: Martin Povi=C5=A1er [ Upstream commit 0a0342ede303fc420f3a388e1ae82da3ae8ff6bd ] 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 Link: https://lore.kernel.org/r/20220919173453.84292-1-povik+lin@cutebit.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 b8cda6b14b49..a13b086a072b 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.35.1