Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2496409rwb; Mon, 3 Oct 2022 01:19:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vUhehfLlzHrx1BA+4RP483cVnhJXt1OVuKD4Di353KpNbzPgX8obK0vYISahbtxiWM32W X-Received: by 2002:a17:902:d490:b0:177:fc1d:6b0c with SMTP id c16-20020a170902d49000b00177fc1d6b0cmr21040148plg.28.1664785167227; Mon, 03 Oct 2022 01:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664785167; cv=none; d=google.com; s=arc-20160816; b=HSwnvUSLZ6tzSDXS0i6GxlXwMjAmEn7rDr/lVIqhupfljqaj+xgGXd/IL3H3Zs/5Zo gSF4QQPwb0U75UhLxOfrFK4q0w6IseZXeLLu60R0rgUu37Qj96T9eBrBENGnP1RH2X7x 7jyB4FMwc/YLLZwglkwk/Bsh55+X/U93nbhggLOql3h8dxevJJPFHcgjW+PeNi3UW3rO bG8JmXcEQ3HRhtmIGlwY1uc+dekchbBbuK0vtGu5YuOQk8GmswwKTb1AACw02kmxunJF eovw1omBn6pM/EZFq7BKLTTqQBt+IjAzjKrMeNbO9jb7VtPQ5DtpTyWlaB45JxKSk7NX 4Zag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kcRsjfD2dwjSAENvKgl8kozyjWBHpGIsCo0iBwzmU64=; b=uGahroYIwylF78jXveQ+13nFXvVsJTFEONuHhUu/b9nZLjh58+coQZnru9LZQ6CqlN qO1Xi/eisCwk4QtGCuu3GSmR3IxBGo+ZTnwHgJeI7w+7xy4+XyWv6KQOBU5T4K+y4hH/ EHGh3pG7tp6mSO6o28x4QL1K3nk0H8+leNVhTmKa7BZD3TSGdJCRzYJ4I6w1xhK7OnVW J33o5u8zRZ5tKAc3cKzrPs1p370joAwhFR+fgdYjvdeK7vO7OGG6BNJMB4vmJT6j5g/H SLWHCgThOLFQapYsbojQKy5+GY+O6w5Ap3ti10jhQao+CrUStCnva8le8v9WctXHaPUF 5FlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z7BN0S8u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a63db58000000b004393aac966dsi11046594pgi.337.2022.10.03.01.19.14; Mon, 03 Oct 2022 01:19:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z7BN0S8u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231687AbiJCHgW (ORCPT + 99 others); Mon, 3 Oct 2022 03:36:22 -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: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Povišer [ 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šer 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[] = { }, }; +static const struct regmap_config tas2770_i2c_regmap; + static int tas2770_codec_probe(struct snd_soc_component *component) { struct tas2770_priv *tas2770 = @@ -508,6 +510,7 @@ static int tas2770_codec_probe(struct snd_soc_component *component) } tas2770_reset(tas2770); + regmap_reinit_cache(tas2770->regmap, &tas2770_i2c_regmap); return 0; } -- 2.35.1