Re: [PATCH v1 10/13] ASoC: qcom: Add apq8016 lpass driver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Thanks for review,

On 15/05/15 06:23, Kenneth Westfield wrote:
On Wed, May 13, 2015 at 05:03:06AM -0700, Srinivas Kandagatla wrote:
This patch adds apq8016 lpass driver support. APQ8016 has 4 MI2S which
can be routed to one internal codec and 2 external codec interfaces.

Primary, Secondary, Quaternary I2S can do Rx(playback) and Tertiary and
Quaternary can do Tx(capture).

diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig
index 865205e..9cc5ed7 100644
--- a/sound/soc/qcom/Kconfig
+++ b/sound/soc/qcom/Kconfig
@@ -20,6 +20,12 @@ config SND_SOC_LPASS_IPQ806X
  	select SND_SOC_LPASS_CPU
  	select SND_SOC_LPASS_PLATFORM

+config SND_SOC_LPASS_APQ8016
+	tristate
+	depends on SND_SOC_QCOM
+	select SND_SOC_LPASS_CPU
+	select SND_SOC_LPASS_PLATFORM

Continuing from my comments on patch 2/13, should an OF dependency be added
here as well?
LPASS_CPU and LPASS_PLATFORM already has this dependency, so there is no chance that APQ8016 can be selected without OF.


+
  config SND_SOC_STORM
  	tristate "ASoC I2S support for Storm boards"
  	depends on (ARCH_QCOM && SND_SOC_QCOM) || COMPILE_TEST

diff --git a/sound/soc/qcom/lpass-apq8016.c
b/sound/soc/qcom/lpass-apq8016.c
new file mode 100644
index 0000000..5cbf17f0
--- /dev/null
+++ b/sound/soc/qcom/lpass-apq8016.c

+static int apq8016_lpass_free_dma_channel(struct lpass_data *drvdata, int
chan)
+{
+	clear_bit(chan, &drvdata->rdma_ch_bit_map);
+
+	return 0;
+}
+
+static int apq8016_lpass_init(struct platform_device *pdev)
+{
+	struct lpass_data *drvdata = platform_get_drvdata(pdev);
+	struct device *dev = &pdev->dev;
+	int ret;
+
+	drvdata->pcnoc_mport_clk = devm_clk_get(dev, "pcnoc-mport-clk");
+	if (IS_ERR(drvdata->pcnoc_mport_clk)) {
+		dev_err(&pdev->dev, "%s() error getting pcnoc-mport-clk:
%ld\n",
+				__func__,
PTR_ERR(drvdata->pcnoc_mport_clk));
+		return PTR_ERR(drvdata->pcnoc_mport_clk);
+	}
+
+	ret = clk_prepare_enable(drvdata->pcnoc_mport_clk);
+	if (ret) {
+		dev_err(&pdev->dev, "%s() Error enabling ahbix_clk: %d\n",

Please correct the clock name in the log message ...

Yep, will fix it.
+				__func__, ret);
+		return ret;
+	}
+
+	drvdata->pcnoc_sway_clk = devm_clk_get(dev, "pcnoc-sway-clk");
+	if (IS_ERR(drvdata->pcnoc_sway_clk)) {
+		dev_err(&pdev->dev, "%s() error getting pcnoc-sway-clk:
%ld\n",
+				__func__,
PTR_ERR(drvdata->pcnoc_sway_clk));
+		return PTR_ERR(drvdata->pcnoc_sway_clk);
+	}
+
+	ret = clk_prepare_enable(drvdata->pcnoc_sway_clk);
+	if (ret) {
+		dev_err(&pdev->dev, "%s() Error enabling ahbix_clk: %d\n",

... here too.

Sure, I will fix it.

--srini
+				__func__, ret);
+		return ret;
+	}

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux