LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings
@ 2015-03-13  7:54 Kenneth Westfield
  2015-03-13  7:54 ` [PATCH 2/2] ASoC: qcom: Modify test for DSP in LPASS driver Kenneth Westfield
  2015-03-16 11:06 ` [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Kenneth Westfield @ 2015-03-13  7:54 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Kumar Gala
  Cc: Banajit Goswami, Patrick Lai, Takashi Iwai, Jaroslav Kysela,
	David Brown, Bryan Huntsman, Rob Herring, ALSA Mailing List,
	MSM Mailing List, Device Tree Mailing List, Kernel Mailing List,
	Kenneth Westfield

From: Kenneth Westfield <kwestfie@codeaurora.org>

Change the representation of the audio DSP, in the
LPASS CPU bindings description, from a required
subnode to an optional phandle.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
---
 Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
index e7c6e9321863f022ebf0d51b75d7bb83c10b9062..e00732dac9393e95f0530505c9f38127f58980a3 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
@@ -22,13 +22,9 @@ Required properties:
 - reg-names		: A list which must include the following entries:
 				* "lpass-lpaif"
 
-Required subnodes:
+Optional properties:
 
-- qcom,adsp		: Audio DSP sub-node
-
-Optional Audio DSP subnode properties:
-
-- status		: "disabled" indicates the adsp is not available.
+- qcom,adsp		: Phandle for the audio DSP node
 
 Example:
 
@@ -43,7 +39,5 @@ lpass@28100000 {
 	pinctrl-1 = <&mi2s_idle>;
 	reg = <0x28100000 0x10000>;
 	reg-names = "lpass-lpaif";
-	qcom,adsp {
-		status = "disabled";
-	};
+	qcom,adsp = <&adsp>;
 };
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ASoC: qcom: Modify test for DSP in LPASS driver
  2015-03-13  7:54 [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings Kenneth Westfield
@ 2015-03-13  7:54 ` Kenneth Westfield
  2015-03-16 11:06 ` [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Kenneth Westfield @ 2015-03-13  7:54 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Kumar Gala
  Cc: Banajit Goswami, Patrick Lai, Takashi Iwai, Jaroslav Kysela,
	David Brown, Bryan Huntsman, Rob Herring, ALSA Mailing List,
	MSM Mailing List, Device Tree Mailing List, Kernel Mailing List,
	Kenneth Westfield

From: Kenneth Westfield <kwestfie@codeaurora.org>

As the representation of the DSP in the device
tree has changed from a required subnode to an
optional phandle, modify the test for DSP
existence in the LPASS CPU DAI driver,
accordingly.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
---
 sound/soc/qcom/lpass-cpu.c | 33 +++++++--------------------------
 1 file changed, 7 insertions(+), 26 deletions(-)

diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index d5167131787f3a7663665c94dffe6899bd050179..6698d058de29600a464be79490bec641736819c3 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -359,45 +359,26 @@ static const struct regmap_config lpass_cpu_regmap_config = {
 	.cache_type = REGCACHE_FLAT,
 };
 
-static int lpass_cpu_parse_of(struct device *dev)
+static int lpass_cpu_platform_probe(struct platform_device *pdev)
 {
+	struct lpass_data *drvdata;
 	struct device_node *dsp_of_node;
+	struct resource *res;
+	int ret;
 
-	dsp_of_node = of_get_child_by_name(dev->of_node, "qcom,adsp");
-	if (!dsp_of_node) {
-		dev_err(dev, "%s() error getting qcom,adsp sub-node\n",
-				__func__);
-		return -EINVAL;
-	}
-
-	if (of_device_is_available(dsp_of_node)) {
-		dev_err(dev, "%s() DSP exists and holds audio resources\n",
+	dsp_of_node = of_parse_phandle(pdev->dev.of_node, "qcom,adsp", 0);
+	if (dsp_of_node) {
+		dev_err(&pdev->dev, "%s() DSP exists and holds audio resources\n",
 				__func__);
 		return -EBUSY;
 	}
 
-	return 0;
-}
-
-static int lpass_cpu_platform_probe(struct platform_device *pdev)
-{
-	struct lpass_data *drvdata;
-	struct resource *res;
-	int ret;
-
 	drvdata = devm_kzalloc(&pdev->dev, sizeof(struct lpass_data),
 			GFP_KERNEL);
 	if (!drvdata)
 		return -ENOMEM;
 	platform_set_drvdata(pdev, drvdata);
 
-	ret = lpass_cpu_parse_of(&pdev->dev);
-	if (ret) {
-		dev_err(&pdev->dev, "%s() error getting DT node info: %d\n",
-				__func__, ret);
-		return ret;
-	}
-
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-lpaif");
 	if (!res) {
 		dev_err(&pdev->dev, "%s() error getting resource\n", __func__);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings
  2015-03-13  7:54 [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings Kenneth Westfield
  2015-03-13  7:54 ` [PATCH 2/2] ASoC: qcom: Modify test for DSP in LPASS driver Kenneth Westfield
@ 2015-03-16 11:06 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-03-16 11:06 UTC (permalink / raw)
  To: Kenneth Westfield
  Cc: Liam Girdwood, Kumar Gala, Banajit Goswami, Patrick Lai,
	Takashi Iwai, Jaroslav Kysela, David Brown, Bryan Huntsman,
	Rob Herring, ALSA Mailing List, MSM Mailing List,
	Device Tree Mailing List, Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

On Fri, Mar 13, 2015 at 12:54:16AM -0700, Kenneth Westfield wrote:
> From: Kenneth Westfield <kwestfie@codeaurora.org>
> 
> Change the representation of the audio DSP, in the
> LPASS CPU bindings description, from a required
> subnode to an optional phandle.

Applied both, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-16 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13  7:54 [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings Kenneth Westfield
2015-03-13  7:54 ` [PATCH 2/2] ASoC: qcom: Modify test for DSP in LPASS driver Kenneth Westfield
2015-03-16 11:06 ` [PATCH 1/2] ASoC: qcom: Change qcom,adsp in LPASS CPU bindings Mark Brown

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).