devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>,
	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, 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: Venkata Prasad Potturu <potturu@codeaurora.org>
Subject: Re: [PATCH v3 4/5] ASoC: codecs: tx-macro: Update tx default values
Date: Tue, 12 Oct 2021 10:04:37 +0100	[thread overview]
Message-ID: <9261e403-9cbf-d955-d555-1e9cbbdde3df@linaro.org> (raw)
In-Reply-To: <1633702144-19017-5-git-send-email-srivasam@codeaurora.org>



On 08/10/2021 15:09, Srinivasa Rao Mandadapu wrote:
> Update mic control register default values to hardware reset values
> lpass sc7280.
> 
> Fixes: c39667ddcfc5 (ASoC: codecs: lpass-tx-macro: add support for lpass tx macro)

I dont think this should have fixes tag, as you are adding default 
values for sc7280.

with that fixed,

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> 
> Signed-off-by: Venkata Prasad Potturu <potturu@codeaurora.org>
> Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
> ---
>   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);
> 

  reply	other threads:[~2021-10-12  9:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 14:08 [PATCH v3 0/5] Update Lpass digital codec macro drivers Srinivasa Rao Mandadapu
2021-10-08 14:09 ` [PATCH v3 1/5] ASoC: qcom: Add compatible names in va,wsa,rx,tx codec drivers for sc7280 Srinivasa Rao Mandadapu
2021-10-12  9:05   ` Srinivas Kandagatla
2021-10-08 14:09 ` [PATCH v3 2/5] ASoC: qcom: dt-bindings: Add compatible names for lpass sc7280 digital codecs Srinivasa Rao Mandadapu
2021-10-08 19:48   ` Rob Herring
2021-10-08 21:58   ` Rob Herring
2021-10-12  9:04   ` Srinivas Kandagatla
2021-10-08 14:09 ` [PATCH v3 3/5] ASoC: codecs: tx-macro: Enable tx top soundwire mic clock Srinivasa Rao Mandadapu
2021-10-08 14:09 ` [PATCH v3 4/5] ASoC: codecs: tx-macro: Update tx default values Srinivasa Rao Mandadapu
2021-10-12  9:04   ` Srinivas Kandagatla [this message]
2021-10-08 14:09 ` [PATCH v3 5/5] ASoC: codecs: Change bulk clock voting to optional voting in digital codecs Srinivasa Rao Mandadapu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9261e403-9cbf-d955-d555-1e9cbbdde3df@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=judyhsiao@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=plai@codeaurora.org \
    --cc=potturu@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=rohitkr@codeaurora.org \
    --cc=srivasam@codeaurora.org \
    --cc=swboyd@chromium.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).