Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2490208rwb; Mon, 3 Oct 2022 01:11:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/rHV5BbrDaXbGcpL59toawpEUke5YpalAvfycqzCQp5+wIQTRHhyXTxlI21AlAUzENlRR X-Received: by 2002:a63:3158:0:b0:44b:3b86:8e1d with SMTP id x85-20020a633158000000b0044b3b868e1dmr6951753pgx.233.1664784696297; Mon, 03 Oct 2022 01:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664784696; cv=none; d=google.com; s=arc-20160816; b=afCUa0rEaHIzePrKzuCW1+OOh3yQXJcS9Z5oDcDGTJday138QUKRY4Da9BMY5vq1KN WTekjhHLszPYr69EwRbYlsXYRcN7WPSBnvhT7rntCjXnGJV3wy6lw+y9IJ5TxY47dp7d TVuyK8wNd4F5k1c4OoMKk/MG/j4HBSH6ha2bvkGyRqWUE2aEMwXTr6WEbZkFfbav+vvy 2ZLQusGaa5yxngFIBnARu/IQrcW2Mc9DV+Dcocj2xpXuBo5fbkiW2RBITtp8vqzX56Q5 O697fsill3gJ35z551HzZYe9sPnPHZkwpP8180GyFa4+WIL63S+33ZlycwavaEti60sZ hoFw== 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=yOWAjfVZUf+ouggKVEjyC9xEcaYKlltARZf72t4a7zA=; b=pEGiqCwgJUMj0J1rRXi+QxlXwIysQu/3vB1hafru5mNqqX1vbmNHVXuZit1yxvbi1s zz0rDWK2BOWp48q+KO/erHzzBgDV8UU0dqrjd7Zhxch5HokPrORRvPDsZnP6IqcNwt4C dGW5Exs9b65sHiE8W1SauI/Ds6emap0s5KDU3KDHKxhLX+kxMJTXXNdDeVBFS1Ogx04T yqsjv7HD4r0BuRjU/KtIGQTtOfIGvaSzOWfqjewwR8vWQ9MYZ3ZixDpJagKVlgUD5wPz UPr8wwZy+4MPBIPu/PBthZKpAAmX2siiY/B6RxMXauX2zbJyA4s28LRBy9i1osYFttj2 BFog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uPFI+NuR; 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 s4-20020a634504000000b0043dc7961525si9872769pga.470.2022.10.03.01.11.24; Mon, 03 Oct 2022 01:11:36 -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=uPFI+NuR; 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 S231585AbiJCHhH (ORCPT + 99 others); Mon, 3 Oct 2022 03:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbiJCHez (ORCPT ); Mon, 3 Oct 2022 03:34:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C0AF52E48; Mon, 3 Oct 2022 00:22:28 -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 ams.source.kernel.org (Postfix) with ESMTPS id C994AB80E99; Mon, 3 Oct 2022 07:21:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40DCEC433D7; Mon, 3 Oct 2022 07:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781715; bh=wV6w/5yjSXng0Df1vDN/QOCW81kAq0odOT+BHUZvNjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uPFI+NuRjMCPwWWCH3QaJBxMMNijhBfHLOPeyqISJ18s3ppZDPrFxoO8DcjII1w1T YFvd90O0AfR/SVL3Tp8y4cbZbrrsNU/lmPT89g+o2LSpTvcEKZbGFrMIm+ybvwA4tj 20LtWbhUBuHVFwxTvP9UtRy877KOVRUZ4r+7nFrs= 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.10 38/52] ASoC: tas2770: Reinit regcache on reset Date: Mon, 3 Oct 2022 09:11:45 +0200 Message-Id: <20221003070719.871312679@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070718.687440096@linuxfoundation.org> References: <20221003070718.687440096@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 024ec68e8d35..171bbcc919d5 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