[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150517161444.GA10901@kwestfie-linux.qualcomm.com>
Date: Sun, 17 May 2015 09:14:44 -0700
From: Kenneth Westfield <kwestfie@...eaurora.org>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc: Patrick Lai <plai@...eaurora.org>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Banajit Goswami <bgoswami@...eaurora.org>,
Kenneth Westfield <kwestfie@...eaurora.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v2 05/13] ASoC: qcom: support bitclk and osrclk per i2s
port
On Sat, May 16, 2015 at 05:32:42AM -0700, Srinivas Kandagatla wrote:
> This patch adds support to allow bitclk and osrclk per i2s dai port.
> on APQ8016 there are 4 i2s ports each one has its own bit clks.
>
> Without this patch its not possible to support multiple i2s ports in the
> lpass driver.
> @@ -400,18 +402,34 @@ int asoc_qcom_lpass_cpu_platform_probe(struct
> platform_device *pdev)
> if (variant->init)
> variant->init(pdev);
>
> - drvdata->mi2s_osr_clk = devm_clk_get(&pdev->dev, "mi2s-osr-clk");
> - if (IS_ERR(drvdata->mi2s_osr_clk)) {
> - dev_err(&pdev->dev, "%s() error getting mi2s-osr-clk:
> %ld\n",
> - __func__, PTR_ERR(drvdata->mi2s_osr_clk));
> - return PTR_ERR(drvdata->mi2s_osr_clk);
> - }
> -
> - drvdata->mi2s_bit_clk = devm_clk_get(&pdev->dev, "mi2s-bit-clk");
> - if (IS_ERR(drvdata->mi2s_bit_clk)) {
> - dev_err(&pdev->dev, "%s() error getting mi2s-bit-clk:
> %ld\n",
> - __func__, PTR_ERR(drvdata->mi2s_bit_clk));
> - return PTR_ERR(drvdata->mi2s_bit_clk);
> + for (i = 0; i < variant->num_dai; i++) {
> + dai_id = variant->dai_driver[i].id;
> + if (variant->num_dai > 1)
> + sprintf(clk_name, "mi2s-osr-clk%d", i);
> + else
> + sprintf(clk_name, "mi2s-osr-clk");
> +
> + drvdata->mi2s_osr_clk[dai_id] = devm_clk_get(&pdev->dev,
> + clk_name);
> + if (IS_ERR(drvdata->mi2s_osr_clk[dai_id])) {
> + dev_err(&pdev->dev,
> + "%s() error getting mi2s-osr-clk: %ld\n",
> + __func__,
> + return PTR_ERR(drvdata->mi2s_osr_clk[dai_id]));
Should the previous two lines be:
+ __func__, PTR_ERR(drvdata->mi2s_osr_clk[dai_id]));
+ return PTR_ERR(drvdata->mi2s_osr_clk[dai_id]);
as you remove the return in patch 6?
> + }
> +
> + if (variant->num_dai > 1)
> + sprintf(clk_name, "mi2s-bit-clk%d", i);
> + else
> + sprintf(clk_name, "mi2s-bit-clk");
> +
> + drvdata->mi2s_bit_clk[dai_id] = devm_clk_get(&pdev->dev,
> clk_name);
> + if (IS_ERR(drvdata->mi2s_bit_clk[dai_id])) {
> + dev_err(&pdev->dev,
> + "%s() error getting mi2s-bit-clk: %ld\n",
> + __func__,
> PTR_ERR(drvdata->mi2s_bit_clk[i]));
> + return PTR_ERR(drvdata->mi2s_bit_clk[dai_id]);
> + }
> }
--
Kenneth Westfield
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists