Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp494382rdb; Mon, 29 Jan 2024 08:28:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0ciNokNU4L/CRnWJ0zQ+SKSSI+6DeCV4lNJdT5mPcoc1RqEjAZtkrsp7xOGkftEzeBCQl X-Received: by 2002:a17:906:c093:b0:a2f:d73d:e99c with SMTP id f19-20020a170906c09300b00a2fd73de99cmr4977464ejz.14.1706545717953; Mon, 29 Jan 2024 08:28:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706545717; cv=pass; d=google.com; s=arc-20160816; b=sxpizRK5Qh2GzTKisORL6e3ooJnv/YOmtsv6QObZYmKetZcj+Pg8ghrw4B1Ojdt4zk eV+BUz/tUIiq+r30nnoGdOfKynJX8BVKhhePb2jFUiWO761QwXSamo3Feb5HoyUbZeIe eO0JHNjwCfdx7BIrwqWnMZl8Rw9S/w0VSzoRdeZbLpSwomT5Q/BPY9J7ZSwhVUf6LhS6 hVABMZUMDCOZKLN18aSDhhphns0veCegdC+gG8MyrAuRTcG6oUZII4I1Jhw//+5kfZDg Av0SrC3qKmnWKVGS55dVU9PHFyJdqIuT1uKNYbSis8BHnzQlEmFadLIFs1Eqtawpnosp Gt8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bLJNG6gkApayI38QD45BecXR6JVKZDgCjFVj9m9yPic=; fh=HmcxfOiRAhfdLjKRtDyRjTtuYfcotLlCNOFSdqEobBY=; b=qX7WJFkrN2OgIpxOKhO4+1d3Dps0IP0/709YrV1gXS0Zte0uyMl7uQWACsqIBr40CI qJsQAuU3EI9aOL0FIpzQavtwOmbfuivfzBz2vZBVJAra72qgvnoo8wlbbspgKefwH23y rHgZGCTPTEzqKnjxswcw1FHe3eCfMdUF5oOV7npKtbe04xOeig7727c3iliM5XiRGV0/ nurVwZOMIfZDNkWi337C9rqJM1sqej1A/d/gRwkibXwJ4gKFLvYhVAs3MMynDDRInUcc OeftNvYUzPETuQ87/2AxQYeGBApsfke/tXBOOK3iWtBKGaMgUIcjfxpZpe9qEqYSJZfq 4M2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b="e/5Sab2R"; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-43083-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v20-20020a170906339400b00a35e6c5748esi503935eja.578.2024.01.29.08.28.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 08:28:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43083-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b="e/5Sab2R"; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-43083-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B4CE91F22653 for ; Mon, 29 Jan 2024 16:28:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E59A157042; Mon, 29 Jan 2024 16:28:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="e/5Sab2R" Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 DA816156960; Mon, 29 Jan 2024 16:27:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706545681; cv=none; b=YbHsnxd0kKWY5xgY+IxTHv8wJ19hDBQTVnSczoIy8OzKW5yH+pKwN0TYXeyVG2WLjxktVQuepEY25qigbbVidAtL0mL3GGDr1RKSuY9ft59p6mJMlCXpI9epvXvSTf4V8wuEQcya4E/CrvL21VSjaGt78V4jeqHW1cza+r9v4Xk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706545681; c=relaxed/simple; bh=QaC6ZxGMOB76BF8Ik4we6yBUUBi60GdA8LYD3AzhYTw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hX4iWincWH0zEMNyHtWCVyTUk5/Gd8ek8v995gFOwVdGsS7P3q4I4OAtdKAPRtPgEnOPouvY6HmZRVOLtxvNbBxt/VQ1VQm6GJzHO5jPVYioCxDQx7Ph0ycMKQpWs8w5FzvFfiQkWAQT44MDJD7pPnmj6DjJRNBo5RmiCDGH8Wo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=e/5Sab2R; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40T5fM0B006968; Mon, 29 Jan 2024 10:27:52 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=bLJNG6gkApayI38QD45BecXR6JVKZDgCjFVj9m9yPic=; b= e/5Sab2RvmCXyFPTxAJ2AMD61/gWVWYiYHKxoNwUoltJs47yAD4XgQ04IiHUZHKl G4cor6AVOtwTn3Bc/HSsJNTQ73FOE+Hk0xokvNU/XhHt/YSD94DtpIKJLos7c08Z q2eUHb1ostiu76qPwikbBZEZ6T/HkysjVU+YQPca+O50j1db/l0ybh0+uh+yD7GL tFdrxlXRc1+aSrKfi6276aP/o5mT561nTWtItrSEz1ZqWKJS0fB+Oc3Hu9KMpv/m P9WdFSWe5mOIKMaLYs/yUfs8rJe8FvdBQxtEArdcMpWdhcvHtPBtFXOi1/3rHaek n803mOIyXt+UqEF3avf02g== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3vvy4nta8n-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Jan 2024 10:27:52 -0600 (CST) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 29 Jan 2024 16:27:43 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40 via Frontend Transport; Mon, 29 Jan 2024 16:27:43 +0000 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.64.204]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 20C3A820247; Mon, 29 Jan 2024 16:27:43 +0000 (UTC) From: Richard Fitzgerald To: , CC: , , , , "Richard Fitzgerald" Subject: [PATCH 05/18] ASoC: cs35l56: Don't add the same register patch multiple times Date: Mon, 29 Jan 2024 16:27:24 +0000 Message-ID: <20240129162737.497-6-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240129162737.497-1-rf@opensource.cirrus.com> References: <20240129162737.497-1-rf@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: s8sURSFgOE4CLfHnbqAlu4g3Rk0f8_4V X-Proofpoint-GUID: s8sURSFgOE4CLfHnbqAlu4g3Rk0f8_4V X-Proofpoint-Spam-Reason: safe Move the call to cs35l56_set_patch() earlier in cs35l56_init() so that it only adds the register patch on first-time initialization. The call was after the post_soft_reset label, so every time this function was run to re-initialize the hardware after a reset it would call regmap_register_patch() and add the same reg_sequence again. Signed-off-by: Richard Fitzgerald Fixes: 898673b905b9 ("ASoC: cs35l56: Move shared data into a common data structure") --- sound/soc/codecs/cs35l56.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index 491da77112c3..ea5d2b2eb82a 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -1159,6 +1159,10 @@ int cs35l56_init(struct cs35l56_private *cs35l56) if (ret < 0) return ret; + ret = cs35l56_set_patch(&cs35l56->base); + if (ret) + return ret; + /* Populate the DSP information with the revision and security state */ cs35l56->dsp.part = devm_kasprintf(cs35l56->base.dev, GFP_KERNEL, "cs35l56%s-%02x", cs35l56->base.secured ? "s" : "", cs35l56->base.rev); @@ -1197,10 +1201,6 @@ int cs35l56_init(struct cs35l56_private *cs35l56) if (ret) return ret; - ret = cs35l56_set_patch(&cs35l56->base); - if (ret) - return ret; - /* Registers could be dirty after soft reset or SoundWire enumeration */ regcache_sync(cs35l56->base.regmap); -- 2.39.2