Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1097172pxb; Tue, 26 Oct 2021 02:45:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0MWQjW3FO4HzeOgpU/2agm2Jn2/EkhGr9j7lEgeJfDYPiYPHV0QyV9PEmPD7mz6k2pC0P X-Received: by 2002:a05:6a00:1748:b0:47c:dca:f2f2 with SMTP id j8-20020a056a00174800b0047c0dcaf2f2mr4010513pfc.43.1635241551380; Tue, 26 Oct 2021 02:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635241551; cv=none; d=google.com; s=arc-20160816; b=IYCobsF1aH+7AdBVRdBjJ2NP/5A5E5XT7f5DO8u/Mnx/p2hGoi9Ge4CQGw8w1+UBeg 3I7n5EJ7zjaP+DUNaFGIFO6u8IU1kiIkWC2FFUM3DI+Op1hp/CeNYec/fw4spFb+57lK hFO8M4ejVUcG/2bKbrVbD1rLDykseiyOxZ2U8gF9gxkdkRDsGTb1A7Xlq1fz6nH7O8kq 289Yh/mQsDP8G+zQJY+cShn5O8gV/LY8ul/2uvNUW6C/Q4GiJZiZT8nVCjY//AdcoeSb J1ZV2sX8wxv3TaJJ5OmbwJxToAqA/TFBRRigNGowgPC8p0jieX1GC/Db8PtHzrNgjY0O HbbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=BOMh+4VdrRQoVapnfn25fcCYKN01T4UssNLI0xClgb0=; b=f2dfAOSMXXZBeV/CVSF1pXiMzU+6Op/csdv6GK/mrvTvEEQMuxHrC/ufI7jk0vl84E 2BBynpoCUHssjDiSkm1SeMBQQWkNjddUL4ZQGgZOmznf2hOfniK7iK197pFKeRK4fSW2 3VkkiBwR/ScRJUDkfvSYOnFMHz35jp/BdnPDWsLgTkA04LP8xf/2jxxc4MLs2M/X7BSv WVJFCrp1Whv06OwxvNeC19v8S4g6fsMAG84biu5qLmJFX/u9SCr5FaDyWh4cKfSMcVk1 CW7yJyWRKv+mNYjUDM5Z/w0QnYAaQevPbcE+UOjMSMFo3YMmqup/PKQJqxA+gW9NOXT+ Tkhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=jfjQ3JFr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si35258597pgj.102.2021.10.26.02.45.34; Tue, 26 Oct 2021 02:45:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=jfjQ3JFr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233946AbhJZHqR (ORCPT + 99 others); Tue, 26 Oct 2021 03:46:17 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:31149 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233673AbhJZHqN (ORCPT ); Tue, 26 Oct 2021 03:46:13 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1635234230; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=BOMh+4VdrRQoVapnfn25fcCYKN01T4UssNLI0xClgb0=; b=jfjQ3JFrEWBoTdLBHhoYCaFcCwMPYiqVA/fZUzpzWdIFKL6HH3Gw7cYd5/5jh/zo9OYq0IpN uXtp8SzThqD0ikxP9gbCzLFOUu6evnDs9ct5xPik/oNQ2LOq/l/jSi8YoHcnNGF7J5bAKC6b ZKtPOG0o+2BNfsoHaF/MPpz3t6E= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 6177b1b58e67b5f04eff52b8 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 26 Oct 2021 07:43:49 GMT Sender: srivasam=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B33DBC43618; Tue, 26 Oct 2021 07:43:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from hu-srivasam-hyd.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: srivasam) by smtp.codeaurora.org (Postfix) with ESMTPSA id 622B7C43460; Tue, 26 Oct 2021 07:43:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 622B7C43460 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Srinivasa Rao Mandadapu To: agross@kernel.org, bjorn.andersson@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, plai@codeaurora.org, bgoswami@codeaurora.org, perex@perex.cz, tiwai@suse.com, srinivas.kandagatla@linaro.org, rohitkr@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, swboyd@chromium.org, judyhsiao@chromium.org Cc: Srinivasa Rao Mandadapu , Venkata Prasad Potturu Subject: [PATCH v4 4/5] ASoC: codecs: tx-macro: Update tx default values Date: Tue, 26 Oct 2021 13:13:07 +0530 Message-Id: <1635234188-7746-5-git-send-email-srivasam@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635234188-7746-1-git-send-email-srivasam@codeaurora.org> References: <1635234188-7746-1-git-send-email-srivasam@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update mic control register default values to hardware reset values lpass sc7280. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu --- sound/soc/codecs/lpass-tx-macro.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index d472af1..6742405 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -272,7 +272,7 @@ struct tx_macro { static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400); -static const struct reg_default tx_defaults[] = { +static struct reg_default tx_defaults[] = { /* TX Macro */ { CDC_TX_CLK_RST_CTRL_MCLK_CONTROL, 0x00 }, { CDC_TX_CLK_RST_CTRL_FS_CNT_CONTROL, 0x00 }, @@ -1781,9 +1781,10 @@ static const struct snd_soc_component_driver tx_macro_component_drv = { static int tx_macro_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; struct tx_macro *tx; void __iomem *base; - int ret; + int ret, reg; tx = devm_kzalloc(dev, sizeof(*tx), GFP_KERNEL); if (!tx) @@ -1805,6 +1806,20 @@ static int tx_macro_probe(struct platform_device *pdev) if (IS_ERR(base)) return PTR_ERR(base); + /* Update defaults for lpass sc7280 */ + if (of_device_is_compatible(np, "qcom,sc7280-lpass-tx-macro")) { + for (reg = 0; reg < ARRAY_SIZE(tx_defaults); reg++) { + switch (tx_defaults[reg].reg) { + case CDC_TX_TOP_CSR_SWR_AMIC0_CTL: + case CDC_TX_TOP_CSR_SWR_AMIC1_CTL: + tx_defaults[reg].def = 0x0E; + break; + default: + break; + } + } + } + tx->regmap = devm_regmap_init_mmio(dev, base, &tx_regmap_config); dev_set_drvdata(dev, tx); -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.