All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] ASoC: qdsp6: Fix dt based module loading
@ 2018-06-25 14:31 ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

Recent discussion on https://lkml.org/lkml/2018/6/18/1282 suggested
that qdsp6 code is using less common of_platform apis which would
not give dt based module loading support.

Suggestion from Rob was to add compatible strings to the dais nodes
This patchset adds this. Also this patchset has 2 trivial fixes which
is removing redundant owner and fix a error check in q6routing.

Thanks,
srini

Srinivas Kandagatla (11):
  ASoC: q6adm: dt-bindings: add compatible string to routing
  ASoC: q6asm: dt-bindings: add compatible string to dais
  ASoC: q6afe: dt-bindings: add compatible string to dais
  ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
  ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
  ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()
  ASoC: qdsp6: q6afe-dai: support dt based module loading
  ASoC: qdsp6: q6asm-dai: support dt based module loading
  ASoC: qdsp6: q6routing: support dt based module loading
  ASoC: qcom: apq8096: remove redundant owner assignment
  ASoC: qdsp6: q6routing: add proper error check

 Documentation/devicetree/bindings/sound/qcom,q6adm.txt |  6 ++++++
 Documentation/devicetree/bindings/sound/qcom,q6afe.txt |  6 ++++++
 Documentation/devicetree/bindings/sound/qcom,q6asm.txt |  6 ++++++
 sound/soc/qcom/apq8096.c                               |  1 -
 sound/soc/qcom/qdsp6/q6adm.c                           | 15 ++-------------
 sound/soc/qcom/qdsp6/q6afe-dai.c                       |  8 ++++++++
 sound/soc/qcom/qdsp6/q6afe.c                           | 16 ++--------------
 sound/soc/qcom/qdsp6/q6asm-dai.c                       |  8 ++++++++
 sound/soc/qcom/qdsp6/q6asm.c                           | 17 ++---------------
 sound/soc/qcom/qdsp6/q6routing.c                       | 10 +++++++++-
 10 files changed, 49 insertions(+), 44 deletions(-)

-- 
2.16.2

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

* [PATCH 00/11] ASoC: qdsp6: Fix dt based module loading
@ 2018-06-25 14:31 ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Recent discussion on https://lkml.org/lkml/2018/6/18/1282 suggested
that qdsp6 code is using less common of_platform apis which would
not give dt based module loading support.

Suggestion from Rob was to add compatible strings to the dais nodes
This patchset adds this. Also this patchset has 2 trivial fixes which
is removing redundant owner and fix a error check in q6routing.

Thanks,
srini

Srinivas Kandagatla (11):
  ASoC: q6adm: dt-bindings: add compatible string to routing
  ASoC: q6asm: dt-bindings: add compatible string to dais
  ASoC: q6afe: dt-bindings: add compatible string to dais
  ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
  ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
  ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()
  ASoC: qdsp6: q6afe-dai: support dt based module loading
  ASoC: qdsp6: q6asm-dai: support dt based module loading
  ASoC: qdsp6: q6routing: support dt based module loading
  ASoC: qcom: apq8096: remove redundant owner assignment
  ASoC: qdsp6: q6routing: add proper error check

 Documentation/devicetree/bindings/sound/qcom,q6adm.txt |  6 ++++++
 Documentation/devicetree/bindings/sound/qcom,q6afe.txt |  6 ++++++
 Documentation/devicetree/bindings/sound/qcom,q6asm.txt |  6 ++++++
 sound/soc/qcom/apq8096.c                               |  1 -
 sound/soc/qcom/qdsp6/q6adm.c                           | 15 ++-------------
 sound/soc/qcom/qdsp6/q6afe-dai.c                       |  8 ++++++++
 sound/soc/qcom/qdsp6/q6afe.c                           | 16 ++--------------
 sound/soc/qcom/qdsp6/q6asm-dai.c                       |  8 ++++++++
 sound/soc/qcom/qdsp6/q6asm.c                           | 17 ++---------------
 sound/soc/qcom/qdsp6/q6routing.c                       | 10 +++++++++-
 10 files changed, 49 insertions(+), 44 deletions(-)

-- 
2.16.2

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

* [PATCH 01/11] ASoC: q6adm: dt-bindings: add compatible string to routing
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

Add compatible string to routing so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6adm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
index cb709e5dbc44..bbae426cdfb1 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
@@ -18,6 +18,11 @@ used by the apr service device.
 = ADM routing
 "routing" subnode of the ADM node represents adm routing specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6adm-routing".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6adm@8 {
 	compatible = "qcom,q6adm";
 	reg = <APR_SVC_ADM>;
 	q6routing: routing {
+		compatible = "qcom,q6adm-routing";
 		#sound-dai-cells = <0>;
 	};
 };
-- 
2.16.2

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

* [PATCH 01/11] ASoC: q6adm: dt-bindings: add compatible string to routing
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Add compatible string to routing so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6adm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
index cb709e5dbc44..bbae426cdfb1 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
@@ -18,6 +18,11 @@ used by the apr service device.
 = ADM routing
 "routing" subnode of the ADM node represents adm routing specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6adm-routing".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6adm at 8 {
 	compatible = "qcom,q6adm";
 	reg = <APR_SVC_ADM>;
 	q6routing: routing {
+		compatible = "qcom,q6adm-routing";
 		#sound-dai-cells = <0>;
 	};
 };
-- 
2.16.2

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

* [PATCH 02/11] ASoC: q6asm: dt-bindings: add compatible string to dais
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
index 2178eb91146f..f9c7bd8c1bc0 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
@@ -17,6 +17,11 @@ used by the apr service device.
 = ASM DAIs (Digial Audio Interface)
 "dais" subnode of the ASM node represents dai specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6asm-dais".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6asm@7 {
 	compatible = "qcom,q6asm";
 	reg = <APR_SVC_ASM>;
 	q6asmdai: dais {
+		compatible = "qcom,q6asm-dais";
 		#sound-dai-cells = <1>;
 	};
 };
-- 
2.16.2

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

* [PATCH 02/11] ASoC: q6asm: dt-bindings: add compatible string to dais
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
index 2178eb91146f..f9c7bd8c1bc0 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
@@ -17,6 +17,11 @@ used by the apr service device.
 = ASM DAIs (Digial Audio Interface)
 "dais" subnode of the ASM node represents dai specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6asm-dais".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6asm at 7 {
 	compatible = "qcom,q6asm";
 	reg = <APR_SVC_ASM>;
 	q6asmdai: dais {
+		compatible = "qcom,q6asm-dais";
 		#sound-dai-cells = <1>;
 	};
 };
-- 
2.16.2

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

* [PATCH 03/11] ASoC: q6afe: dt-bindings: add compatible string to dais
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6afe.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
index bdbf87df8c0b..f7ea77ba7947 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
@@ -17,6 +17,11 @@ used by all apr services. Must contain the following properties.
 subnode of "dais" representing board specific dai setup.
 "dais" node should have following properties followed by dai children.
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6afe-dais"
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -103,6 +108,7 @@ q6afe@4 {
 		#sound-dai-cells = <1>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+		compatible = "qcom,q6afe-dais";
 
 		hdmi@1 {
 			reg = <1>;
-- 
2.16.2

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

* [PATCH 03/11] ASoC: q6afe: dt-bindings: add compatible string to dais
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6afe.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
index bdbf87df8c0b..f7ea77ba7947 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
@@ -17,6 +17,11 @@ used by all apr services. Must contain the following properties.
 subnode of "dais" representing board specific dai setup.
 "dais" node should have following properties followed by dai children.
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6afe-dais"
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -103,6 +108,7 @@ q6afe at 4 {
 		#sound-dai-cells = <1>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+		compatible = "qcom,q6afe-dais";
 
 		hdmi at 1 {
 			reg = <1>;
-- 
2.16.2

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

* [PATCH 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6adm.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c
index 9983c665a941..dfd5bc3ddd52 100644
--- a/sound/soc/qcom/qdsp6/q6adm.c
+++ b/sound/soc/qcom/qdsp6/q6adm.c
@@ -588,7 +588,6 @@ EXPORT_SYMBOL_GPL(q6adm_close);
 static int q6adm_probe(struct apr_device *adev)
 {
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 	struct q6adm *adm;
 
 	adm = devm_kzalloc(&adev->dev, sizeof(*adm), GFP_KERNEL);
@@ -605,22 +604,12 @@ static int q6adm_probe(struct apr_device *adev)
 	INIT_LIST_HEAD(&adm->copps_list);
 	spin_lock_init(&adm->copps_list_lock);
 
-	dais_np = of_get_child_by_name(dev->of_node, "routing");
-	if (dais_np) {
-		adm->pdev_routing = of_platform_device_create(dais_np,
-							   "q6routing", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6adm_remove(struct apr_device *adev)
 {
-	struct q6adm *adm = dev_get_drvdata(&adev->dev);
-
-	if (adm->pdev_routing)
-		of_platform_device_destroy(&adm->pdev_routing->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.16.2

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

* [PATCH 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6adm.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c
index 9983c665a941..dfd5bc3ddd52 100644
--- a/sound/soc/qcom/qdsp6/q6adm.c
+++ b/sound/soc/qcom/qdsp6/q6adm.c
@@ -588,7 +588,6 @@ EXPORT_SYMBOL_GPL(q6adm_close);
 static int q6adm_probe(struct apr_device *adev)
 {
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 	struct q6adm *adm;
 
 	adm = devm_kzalloc(&adev->dev, sizeof(*adm), GFP_KERNEL);
@@ -605,22 +604,12 @@ static int q6adm_probe(struct apr_device *adev)
 	INIT_LIST_HEAD(&adm->copps_list);
 	spin_lock_init(&adm->copps_list_lock);
 
-	dais_np = of_get_child_by_name(dev->of_node, "routing");
-	if (dais_np) {
-		adm->pdev_routing = of_platform_device_create(dais_np,
-							   "q6routing", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6adm_remove(struct apr_device *adev)
 {
-	struct q6adm *adm = dev_get_drvdata(&adev->dev);
-
-	if (adm->pdev_routing)
-		of_platform_device_destroy(&adm->pdev_routing->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.16.2

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

* [PATCH 05/11] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6asm.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
index 530852385cad..2b2c7233bb5f 100644
--- a/sound/soc/qcom/qdsp6/q6asm.c
+++ b/sound/soc/qcom/qdsp6/q6asm.c
@@ -174,10 +174,8 @@ struct q6asm {
 	struct device *dev;
 	struct q6core_svc_api_info ainfo;
 	wait_queue_head_t mem_wait;
-	struct platform_device *pcmdev;
 	spinlock_t slock;
 	struct audio_client *session[MAX_SESSIONS + 1];
-	struct platform_device *pdev_dais;
 };
 
 struct audio_client {
@@ -1344,7 +1342,6 @@ EXPORT_SYMBOL_GPL(q6asm_cmd_nowait);
 static int q6asm_probe(struct apr_device *adev)
 {
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 	struct q6asm *q6asm;
 
 	q6asm = devm_kzalloc(dev, sizeof(*q6asm), GFP_KERNEL);
@@ -1359,22 +1356,12 @@ static int q6asm_probe(struct apr_device *adev)
 	spin_lock_init(&q6asm->slock);
 	dev_set_drvdata(dev, q6asm);
 
-	dais_np = of_get_child_by_name(dev->of_node, "dais");
-	if (dais_np) {
-		q6asm->pdev_dais = of_platform_device_create(dais_np,
-							   "q6asm-dai", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6asm_remove(struct apr_device *adev)
 {
-	struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
-
-	if (q6asm->pdev_dais)
-		of_platform_device_destroy(&q6asm->pdev_dais->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.16.2

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

* [PATCH 05/11] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6asm.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
index 530852385cad..2b2c7233bb5f 100644
--- a/sound/soc/qcom/qdsp6/q6asm.c
+++ b/sound/soc/qcom/qdsp6/q6asm.c
@@ -174,10 +174,8 @@ struct q6asm {
 	struct device *dev;
 	struct q6core_svc_api_info ainfo;
 	wait_queue_head_t mem_wait;
-	struct platform_device *pcmdev;
 	spinlock_t slock;
 	struct audio_client *session[MAX_SESSIONS + 1];
-	struct platform_device *pdev_dais;
 };
 
 struct audio_client {
@@ -1344,7 +1342,6 @@ EXPORT_SYMBOL_GPL(q6asm_cmd_nowait);
 static int q6asm_probe(struct apr_device *adev)
 {
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 	struct q6asm *q6asm;
 
 	q6asm = devm_kzalloc(dev, sizeof(*q6asm), GFP_KERNEL);
@@ -1359,22 +1356,12 @@ static int q6asm_probe(struct apr_device *adev)
 	spin_lock_init(&q6asm->slock);
 	dev_set_drvdata(dev, q6asm);
 
-	dais_np = of_get_child_by_name(dev->of_node, "dais");
-	if (dais_np) {
-		q6asm->pdev_dais = of_platform_device_create(dais_np,
-							   "q6asm-dai", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6asm_remove(struct apr_device *adev)
 {
-	struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
-
-	if (q6asm->pdev_dais)
-		of_platform_device_destroy(&q6asm->pdev_dais->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.16.2

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

* [PATCH 06/11] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6afe.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 01f43218984b..621b67b34db9 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -316,7 +316,6 @@ struct q6afe {
 	struct mutex lock;
 	struct list_head port_list;
 	spinlock_t port_list_lock;
-	struct platform_device *pdev_dais;
 };
 
 struct afe_port_cmd_device_start {
@@ -1438,7 +1437,6 @@ static int q6afe_probe(struct apr_device *adev)
 {
 	struct q6afe *afe;
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 
 	afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL);
 	if (!afe)
@@ -1453,22 +1451,12 @@ static int q6afe_probe(struct apr_device *adev)
 
 	dev_set_drvdata(dev, afe);
 
-	dais_np = of_get_child_by_name(dev->of_node, "dais");
-	if (dais_np) {
-		afe->pdev_dais = of_platform_device_create(dais_np,
-							   "q6afe-dai", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6afe_remove(struct apr_device *adev)
 {
-	struct q6afe *afe = dev_get_drvdata(&adev->dev);
-
-	if (afe->pdev_dais)
-		of_platform_device_destroy(&afe->pdev_dais->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.16.2

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

* [PATCH 06/11] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6afe.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 01f43218984b..621b67b34db9 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -316,7 +316,6 @@ struct q6afe {
 	struct mutex lock;
 	struct list_head port_list;
 	spinlock_t port_list_lock;
-	struct platform_device *pdev_dais;
 };
 
 struct afe_port_cmd_device_start {
@@ -1438,7 +1437,6 @@ static int q6afe_probe(struct apr_device *adev)
 {
 	struct q6afe *afe;
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 
 	afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL);
 	if (!afe)
@@ -1453,22 +1451,12 @@ static int q6afe_probe(struct apr_device *adev)
 
 	dev_set_drvdata(dev, afe);
 
-	dais_np = of_get_child_by_name(dev->of_node, "dais");
-	if (dais_np) {
-		afe->pdev_dais = of_platform_device_create(dais_np,
-							   "q6afe-dai", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6afe_remove(struct apr_device *adev)
 {
-	struct q6afe *afe = dev_get_drvdata(&adev->dev);
-
-	if (afe->pdev_dais)
-		of_platform_device_destroy(&afe->pdev_dais->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.16.2

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

* [PATCH 07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6afe-dai.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
index 5002dd05bf27..7fbf762a45ac 100644
--- a/sound/soc/qcom/qdsp6/q6afe-dai.c
+++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
@@ -1290,9 +1290,17 @@ static int q6afe_dai_dev_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id q6afe_dai_device_id[]  = {
+	{ .compatible = "qcom,q6afe-dais" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, q6afe_dai_device_id);
+
 static struct platform_driver q6afe_dai_platform_driver = {
 	.driver = {
 		.name = "q6afe-dai",
+		.of_match_table = of_match_ptr(q6afe_dai_device_id),
 	},
 	.probe = q6afe_dai_dev_probe,
 	.remove = q6afe_dai_dev_remove,
-- 
2.16.2

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

* [PATCH 07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6afe-dai.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
index 5002dd05bf27..7fbf762a45ac 100644
--- a/sound/soc/qcom/qdsp6/q6afe-dai.c
+++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
@@ -1290,9 +1290,17 @@ static int q6afe_dai_dev_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id q6afe_dai_device_id[]  = {
+	{ .compatible = "qcom,q6afe-dais" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, q6afe_dai_device_id);
+
 static struct platform_driver q6afe_dai_platform_driver = {
 	.driver = {
 		.name = "q6afe-dai",
+		.of_match_table = of_match_ptr(q6afe_dai_device_id),
 	},
 	.probe = q6afe_dai_dev_probe,
 	.remove = q6afe_dai_dev_remove,
-- 
2.16.2

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

* [PATCH 08/11] ASoC: qdsp6: q6asm-dai: support dt based module loading
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6asm-dai.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
index 349c6a883c63..4ac9c66b2262 100644
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -611,9 +611,17 @@ static int q6asm_dai_dev_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id q6asm_dai_device_id[]  = {
+	{ .compatible = "qcom,q6asm-dais" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, q6asm_dai_device_id);
+
 static struct platform_driver q6asm_dai_platform_driver = {
 	.driver = {
 		.name = "q6asm-dai",
+		.of_match_table = of_match_ptr(q6asm_dai_device_id),
 	},
 	.probe = q6asm_dai_probe,
 	.remove = q6asm_dai_dev_remove,
-- 
2.16.2

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

* [PATCH 08/11] ASoC: qdsp6: q6asm-dai: support dt based module loading
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6asm-dai.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
index 349c6a883c63..4ac9c66b2262 100644
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -611,9 +611,17 @@ static int q6asm_dai_dev_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id q6asm_dai_device_id[]  = {
+	{ .compatible = "qcom,q6asm-dais" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, q6asm_dai_device_id);
+
 static struct platform_driver q6asm_dai_platform_driver = {
 	.driver = {
 		.name = "q6asm-dai",
+		.of_match_table = of_match_ptr(q6asm_dai_device_id),
 	},
 	.probe = q6asm_dai_probe,
 	.remove = q6asm_dai_dev_remove,
-- 
2.16.2

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

* [PATCH 09/11] ASoC: qdsp6: q6routing: support dt based module loading
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6routing.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
index 593f66b8622f..caf2f847a886 100644
--- a/sound/soc/qcom/qdsp6/q6routing.c
+++ b/sound/soc/qcom/qdsp6/q6routing.c
@@ -993,9 +993,17 @@ static int q6pcm_routing_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id q6pcm_routing_device_id[]  = {
+	{ .compatible = "qcom,q6adm-routing" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, q6pcm_routing_device_id);
+
 static struct platform_driver q6pcm_routing_platform_driver = {
 	.driver = {
 		.name = "q6routing",
+		.of_match_table = of_match_ptr(q6pcm_routing_device_id),
 	},
 	.probe = q6pcm_routing_probe,
 	.remove = q6pcm_routing_remove,
-- 
2.16.2

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

* [PATCH 09/11] ASoC: qdsp6: q6routing: support dt based module loading
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6routing.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
index 593f66b8622f..caf2f847a886 100644
--- a/sound/soc/qcom/qdsp6/q6routing.c
+++ b/sound/soc/qcom/qdsp6/q6routing.c
@@ -993,9 +993,17 @@ static int q6pcm_routing_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id q6pcm_routing_device_id[]  = {
+	{ .compatible = "qcom,q6adm-routing" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, q6pcm_routing_device_id);
+
 static struct platform_driver q6pcm_routing_platform_driver = {
 	.driver = {
 		.name = "q6routing",
+		.of_match_table = of_match_ptr(q6pcm_routing_device_id),
 	},
 	.probe = q6pcm_routing_probe,
 	.remove = q6pcm_routing_remove,
-- 
2.16.2

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

* [PATCH 10/11] ASoC: qcom: apq8096: remove redundant owner assignment
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

module owner is already set in platform_driver_register(), so remove this
redundant assignment.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/apq8096.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
index 561cd429e6f2..6e79fec7e789 100644
--- a/sound/soc/qcom/apq8096.c
+++ b/sound/soc/qcom/apq8096.c
@@ -245,7 +245,6 @@ static struct platform_driver msm_snd_apq8096_driver = {
 	.remove = apq8096_platform_remove,
 	.driver = {
 		.name = "msm-snd-apq8096",
-		.owner = THIS_MODULE,
 		.of_match_table = msm_snd_apq8096_dt_match,
 	},
 };
-- 
2.16.2

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

* [PATCH 10/11] ASoC: qcom: apq8096: remove redundant owner assignment
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

module owner is already set in platform_driver_register(), so remove this
redundant assignment.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/apq8096.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
index 561cd429e6f2..6e79fec7e789 100644
--- a/sound/soc/qcom/apq8096.c
+++ b/sound/soc/qcom/apq8096.c
@@ -245,7 +245,6 @@ static struct platform_driver msm_snd_apq8096_driver = {
 	.remove = apq8096_platform_remove,
 	.driver = {
 		.name = "msm-snd-apq8096",
-		.owner = THIS_MODULE,
 		.of_match_table = msm_snd_apq8096_dt_match,
 	},
 };
-- 
2.16.2

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

* [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check
  2018-06-25 14:31 ` Srinivas Kandagatla
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: broonie, linux-arm-msm, alsa-devel, robh+dt, bgoswami
  Cc: rohkumar, devicetree, plai, tiwai, lgirdwood,
	srinivas.kandagatla, niklas.cassel, linux-arm-kernel

q6adm_open can return error pointer or a null in error cases.
Fix this check this.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6routing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
index caf2f847a886..c18f808c7730 100644
--- a/sound/soc/qcom/qdsp6/q6routing.c
+++ b/sound/soc/qcom/qdsp6/q6routing.c
@@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
 			      session->channels, topology, perf_mode,
 			      session->bits_per_sample, 0, 0);
 
-	if (!copp) {
+	if (IS_ERR_OR_NULL(copp)) {
 		mutex_unlock(&routing_data->lock);
 		return -EINVAL;
 	}
-- 
2.16.2

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

* [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check
@ 2018-06-25 14:31   ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-25 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

q6adm_open can return error pointer or a null in error cases.
Fix this check this.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6routing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
index caf2f847a886..c18f808c7730 100644
--- a/sound/soc/qcom/qdsp6/q6routing.c
+++ b/sound/soc/qcom/qdsp6/q6routing.c
@@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
 			      session->channels, topology, perf_mode,
 			      session->bits_per_sample, 0, 0);
 
-	if (!copp) {
+	if (IS_ERR_OR_NULL(copp)) {
 		mutex_unlock(&routing_data->lock);
 		return -EINVAL;
 	}
-- 
2.16.2

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

* Re: [PATCH 01/11] ASoC: q6adm: dt-bindings: add compatible string to routing
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 17:59     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 17:59 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:05PM +0100, Srinivas Kandagatla wrote:
> Add compatible string to routing so that it can support DT based module
> autoloading.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,q6adm.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
> index cb709e5dbc44..bbae426cdfb1 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
> @@ -18,6 +18,11 @@ used by the apr service device.
>  = ADM routing
>  "routing" subnode of the ADM node represents adm routing specific configuration
>  
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,q6adm-routing".
> +
>  - #sound-dai-cells
>  	Usage: required
>  	Value type: <u32>
> @@ -28,6 +33,7 @@ q6adm@8 {
>  	compatible = "qcom,q6adm";
>  	reg = <APR_SVC_ADM>;
>  	q6routing: routing {
> +		compatible = "qcom,q6adm-routing";
>  		#sound-dai-cells = <0>;
>  	};
>  };
> -- 
> 2.16.2
> 

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

* [PATCH 01/11] ASoC: q6adm: dt-bindings: add compatible string to routing
@ 2018-06-25 17:59     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 17:59 UTC (permalink / raw)
  To: linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:05PM +0100, Srinivas Kandagatla wrote:
> Add compatible string to routing so that it can support DT based module
> autoloading.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,q6adm.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
> index cb709e5dbc44..bbae426cdfb1 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
> @@ -18,6 +18,11 @@ used by the apr service device.
>  = ADM routing
>  "routing" subnode of the ADM node represents adm routing specific configuration
>  
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,q6adm-routing".
> +
>  - #sound-dai-cells
>  	Usage: required
>  	Value type: <u32>
> @@ -28,6 +33,7 @@ q6adm at 8 {
>  	compatible = "qcom,q6adm";
>  	reg = <APR_SVC_ADM>;
>  	q6routing: routing {
> +		compatible = "qcom,q6adm-routing";
>  		#sound-dai-cells = <0>;
>  	};
>  };
> -- 
> 2.16.2
> 

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

* Re: [PATCH 02/11] ASoC: q6asm: dt-bindings: add compatible string to dais
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:00     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:00 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:06PM +0100, Srinivas Kandagatla wrote:
> Add compatible string to dais so that it can support DT based module
> autoloading.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> index 2178eb91146f..f9c7bd8c1bc0 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> @@ -17,6 +17,11 @@ used by the apr service device.
>  = ASM DAIs (Digial Audio Interface)
>  "dais" subnode of the ASM node represents dai specific configuration
>  
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,q6asm-dais".
> +
>  - #sound-dai-cells
>  	Usage: required
>  	Value type: <u32>
> @@ -28,6 +33,7 @@ q6asm@7 {
>  	compatible = "qcom,q6asm";
>  	reg = <APR_SVC_ASM>;
>  	q6asmdai: dais {
> +		compatible = "qcom,q6asm-dais";
>  		#sound-dai-cells = <1>;
>  	};
>  };
> -- 
> 2.16.2
> 

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

* [PATCH 02/11] ASoC: q6asm: dt-bindings: add compatible string to dais
@ 2018-06-25 18:00     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:00 UTC (permalink / raw)
  To: linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:06PM +0100, Srinivas Kandagatla wrote:
> Add compatible string to dais so that it can support DT based module
> autoloading.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> index 2178eb91146f..f9c7bd8c1bc0 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> @@ -17,6 +17,11 @@ used by the apr service device.
>  = ASM DAIs (Digial Audio Interface)
>  "dais" subnode of the ASM node represents dai specific configuration
>  
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,q6asm-dais".
> +
>  - #sound-dai-cells
>  	Usage: required
>  	Value type: <u32>
> @@ -28,6 +33,7 @@ q6asm at 7 {
>  	compatible = "qcom,q6asm";
>  	reg = <APR_SVC_ASM>;
>  	q6asmdai: dais {
> +		compatible = "qcom,q6asm-dais";
>  		#sound-dai-cells = <1>;
>  	};
>  };
> -- 
> 2.16.2
> 

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

* Re: [PATCH 03/11] ASoC: q6afe: dt-bindings: add compatible string to dais
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:01     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:01 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:07PM +0100, Srinivas Kandagatla wrote:
> Add compatible string to dais so that it can support DT based module
> autoloading.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,q6afe.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> index bdbf87df8c0b..f7ea77ba7947 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> @@ -17,6 +17,11 @@ used by all apr services. Must contain the following properties.
>  subnode of "dais" representing board specific dai setup.
>  "dais" node should have following properties followed by dai children.
>  
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,q6afe-dais"
> +
>  - #sound-dai-cells
>  	Usage: required
>  	Value type: <u32>
> @@ -103,6 +108,7 @@ q6afe@4 {
>  		#sound-dai-cells = <1>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> +		compatible = "qcom,q6afe-dais";

Perhaps have the compatible before #sound-dai-cells
(and #size-cells, #address-cells) like in two previous
patches.

>  
>  		hdmi@1 {
>  			reg = <1>;
> -- 
> 2.16.2
> 

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

* [PATCH 03/11] ASoC: q6afe: dt-bindings: add compatible string to dais
@ 2018-06-25 18:01     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:07PM +0100, Srinivas Kandagatla wrote:
> Add compatible string to dais so that it can support DT based module
> autoloading.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,q6afe.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> index bdbf87df8c0b..f7ea77ba7947 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> @@ -17,6 +17,11 @@ used by all apr services. Must contain the following properties.
>  subnode of "dais" representing board specific dai setup.
>  "dais" node should have following properties followed by dai children.
>  
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,q6afe-dais"
> +
>  - #sound-dai-cells
>  	Usage: required
>  	Value type: <u32>
> @@ -103,6 +108,7 @@ q6afe at 4 {
>  		#sound-dai-cells = <1>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> +		compatible = "qcom,q6afe-dais";

Perhaps have the compatible before #sound-dai-cells
(and #size-cells, #address-cells) like in two previous
patches.

>  
>  		hdmi at 1 {
>  			reg = <1>;
> -- 
> 2.16.2
> 

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

* Re: [PATCH 05/11] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:01     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:01 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:09PM +0100, Srinivas Kandagatla wrote:
> Now that the child nodes have there own compatible strings,
> Use of_platform_populate/depopulate() instead of less common
> of_platform_device_create()/destroy().
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6asm.c | 17 ++---------------
>  1 file changed, 2 insertions(+), 15 deletions(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
> index 530852385cad..2b2c7233bb5f 100644
> --- a/sound/soc/qcom/qdsp6/q6asm.c
> +++ b/sound/soc/qcom/qdsp6/q6asm.c
> @@ -174,10 +174,8 @@ struct q6asm {
>  	struct device *dev;
>  	struct q6core_svc_api_info ainfo;
>  	wait_queue_head_t mem_wait;
> -	struct platform_device *pcmdev;

Why is this removed?
If it's a cleanup, perhaps it should be in a separate patch.

>  	spinlock_t slock;
>  	struct audio_client *session[MAX_SESSIONS + 1];
> -	struct platform_device *pdev_dais;
>  };
>  
>  struct audio_client {
> @@ -1344,7 +1342,6 @@ EXPORT_SYMBOL_GPL(q6asm_cmd_nowait);
>  static int q6asm_probe(struct apr_device *adev)
>  {
>  	struct device *dev = &adev->dev;
> -	struct device_node *dais_np;
>  	struct q6asm *q6asm;
>  
>  	q6asm = devm_kzalloc(dev, sizeof(*q6asm), GFP_KERNEL);
> @@ -1359,22 +1356,12 @@ static int q6asm_probe(struct apr_device *adev)
>  	spin_lock_init(&q6asm->slock);
>  	dev_set_drvdata(dev, q6asm);
>  
> -	dais_np = of_get_child_by_name(dev->of_node, "dais");
> -	if (dais_np) {
> -		q6asm->pdev_dais = of_platform_device_create(dais_np,
> -							   "q6asm-dai", dev);
> -		of_node_put(dais_np);
> -	}
> -
> -	return 0;
> +	return of_platform_populate(dev->of_node, NULL, NULL, dev);
>  }
>  
>  static int q6asm_remove(struct apr_device *adev)
>  {
> -	struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
> -
> -	if (q6asm->pdev_dais)
> -		of_platform_device_destroy(&q6asm->pdev_dais->dev, NULL);
> +	of_platform_depopulate(&adev->dev);
>  
>  	return 0;
>  }
> -- 
> 2.16.2
> 

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

* [PATCH 05/11] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
@ 2018-06-25 18:01     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:09PM +0100, Srinivas Kandagatla wrote:
> Now that the child nodes have there own compatible strings,
> Use of_platform_populate/depopulate() instead of less common
> of_platform_device_create()/destroy().
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6asm.c | 17 ++---------------
>  1 file changed, 2 insertions(+), 15 deletions(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
> index 530852385cad..2b2c7233bb5f 100644
> --- a/sound/soc/qcom/qdsp6/q6asm.c
> +++ b/sound/soc/qcom/qdsp6/q6asm.c
> @@ -174,10 +174,8 @@ struct q6asm {
>  	struct device *dev;
>  	struct q6core_svc_api_info ainfo;
>  	wait_queue_head_t mem_wait;
> -	struct platform_device *pcmdev;

Why is this removed?
If it's a cleanup, perhaps it should be in a separate patch.

>  	spinlock_t slock;
>  	struct audio_client *session[MAX_SESSIONS + 1];
> -	struct platform_device *pdev_dais;
>  };
>  
>  struct audio_client {
> @@ -1344,7 +1342,6 @@ EXPORT_SYMBOL_GPL(q6asm_cmd_nowait);
>  static int q6asm_probe(struct apr_device *adev)
>  {
>  	struct device *dev = &adev->dev;
> -	struct device_node *dais_np;
>  	struct q6asm *q6asm;
>  
>  	q6asm = devm_kzalloc(dev, sizeof(*q6asm), GFP_KERNEL);
> @@ -1359,22 +1356,12 @@ static int q6asm_probe(struct apr_device *adev)
>  	spin_lock_init(&q6asm->slock);
>  	dev_set_drvdata(dev, q6asm);
>  
> -	dais_np = of_get_child_by_name(dev->of_node, "dais");
> -	if (dais_np) {
> -		q6asm->pdev_dais = of_platform_device_create(dais_np,
> -							   "q6asm-dai", dev);
> -		of_node_put(dais_np);
> -	}
> -
> -	return 0;
> +	return of_platform_populate(dev->of_node, NULL, NULL, dev);
>  }
>  
>  static int q6asm_remove(struct apr_device *adev)
>  {
> -	struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
> -
> -	if (q6asm->pdev_dais)
> -		of_platform_device_destroy(&q6asm->pdev_dais->dev, NULL);
> +	of_platform_depopulate(&adev->dev);
>  
>  	return 0;
>  }
> -- 
> 2.16.2
> 

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

* Re: [PATCH 06/11] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:02     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:02 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:10PM +0100, Srinivas Kandagatla wrote:
> Now that the child nodes have there own compatible strings,
> Use of_platform_populate/depopulate() instead of less common
> of_platform_device_create()/destroy().
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6afe.c | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
> index 01f43218984b..621b67b34db9 100644
> --- a/sound/soc/qcom/qdsp6/q6afe.c
> +++ b/sound/soc/qcom/qdsp6/q6afe.c
> @@ -316,7 +316,6 @@ struct q6afe {
>  	struct mutex lock;
>  	struct list_head port_list;
>  	spinlock_t port_list_lock;
> -	struct platform_device *pdev_dais;
>  };
>  
>  struct afe_port_cmd_device_start {
> @@ -1438,7 +1437,6 @@ static int q6afe_probe(struct apr_device *adev)
>  {
>  	struct q6afe *afe;
>  	struct device *dev = &adev->dev;
> -	struct device_node *dais_np;
>  
>  	afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL);
>  	if (!afe)
> @@ -1453,22 +1451,12 @@ static int q6afe_probe(struct apr_device *adev)
>  
>  	dev_set_drvdata(dev, afe);
>  
> -	dais_np = of_get_child_by_name(dev->of_node, "dais");
> -	if (dais_np) {
> -		afe->pdev_dais = of_platform_device_create(dais_np,
> -							   "q6afe-dai", dev);
> -		of_node_put(dais_np);
> -	}
> -
> -	return 0;
> +	return of_platform_populate(dev->of_node, NULL, NULL, dev);
>  }
>  
>  static int q6afe_remove(struct apr_device *adev)
>  {
> -	struct q6afe *afe = dev_get_drvdata(&adev->dev);
> -
> -	if (afe->pdev_dais)
> -		of_platform_device_destroy(&afe->pdev_dais->dev, NULL);
> +	of_platform_depopulate(&adev->dev);
>  
>  	return 0;
>  }
> -- 
> 2.16.2
> 

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

* [PATCH 06/11] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()
@ 2018-06-25 18:02     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:02 UTC (permalink / raw)
  To: linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:10PM +0100, Srinivas Kandagatla wrote:
> Now that the child nodes have there own compatible strings,
> Use of_platform_populate/depopulate() instead of less common
> of_platform_device_create()/destroy().
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6afe.c | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
> index 01f43218984b..621b67b34db9 100644
> --- a/sound/soc/qcom/qdsp6/q6afe.c
> +++ b/sound/soc/qcom/qdsp6/q6afe.c
> @@ -316,7 +316,6 @@ struct q6afe {
>  	struct mutex lock;
>  	struct list_head port_list;
>  	spinlock_t port_list_lock;
> -	struct platform_device *pdev_dais;
>  };
>  
>  struct afe_port_cmd_device_start {
> @@ -1438,7 +1437,6 @@ static int q6afe_probe(struct apr_device *adev)
>  {
>  	struct q6afe *afe;
>  	struct device *dev = &adev->dev;
> -	struct device_node *dais_np;
>  
>  	afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL);
>  	if (!afe)
> @@ -1453,22 +1451,12 @@ static int q6afe_probe(struct apr_device *adev)
>  
>  	dev_set_drvdata(dev, afe);
>  
> -	dais_np = of_get_child_by_name(dev->of_node, "dais");
> -	if (dais_np) {
> -		afe->pdev_dais = of_platform_device_create(dais_np,
> -							   "q6afe-dai", dev);
> -		of_node_put(dais_np);
> -	}
> -
> -	return 0;
> +	return of_platform_populate(dev->of_node, NULL, NULL, dev);
>  }
>  
>  static int q6afe_remove(struct apr_device *adev)
>  {
> -	struct q6afe *afe = dev_get_drvdata(&adev->dev);
> -
> -	if (afe->pdev_dais)
> -		of_platform_device_destroy(&afe->pdev_dais->dev, NULL);
> +	of_platform_depopulate(&adev->dev);
>  
>  	return 0;
>  }
> -- 
> 2.16.2
> 

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

* Re: [PATCH 07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:03     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:03 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:11PM +0100, Srinivas Kandagatla wrote:
> This patch uses new compatible string to make DT based module loading work.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6afe-dai.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
> index 5002dd05bf27..7fbf762a45ac 100644
> --- a/sound/soc/qcom/qdsp6/q6afe-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
> @@ -1290,9 +1290,17 @@ static int q6afe_dai_dev_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id q6afe_dai_device_id[]  = {

Double space here.

> +	{ .compatible = "qcom,q6afe-dais" },
> +	{},
> +};
> +

Usually there is no empty line between the table and MODULE_DEVICE_TABLE.

> +MODULE_DEVICE_TABLE(of, q6afe_dai_device_id);
> +
>  static struct platform_driver q6afe_dai_platform_driver = {
>  	.driver = {
>  		.name = "q6afe-dai",
> +		.of_match_table = of_match_ptr(q6afe_dai_device_id),
>  	},
>  	.probe = q6afe_dai_dev_probe,
>  	.remove = q6afe_dai_dev_remove,
> -- 
> 2.16.2
> 

I'm not sure if Rob agrees with me or not,
but since this patch is less than 10 lines,
I think that it would be simpler to review
if it was squashed together with the patch
adding the compatible to the DT binding.

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

* [PATCH 07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading
@ 2018-06-25 18:03     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:11PM +0100, Srinivas Kandagatla wrote:
> This patch uses new compatible string to make DT based module loading work.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6afe-dai.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
> index 5002dd05bf27..7fbf762a45ac 100644
> --- a/sound/soc/qcom/qdsp6/q6afe-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
> @@ -1290,9 +1290,17 @@ static int q6afe_dai_dev_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id q6afe_dai_device_id[]  = {

Double space here.

> +	{ .compatible = "qcom,q6afe-dais" },
> +	{},
> +};
> +

Usually there is no empty line between the table and MODULE_DEVICE_TABLE.

> +MODULE_DEVICE_TABLE(of, q6afe_dai_device_id);
> +
>  static struct platform_driver q6afe_dai_platform_driver = {
>  	.driver = {
>  		.name = "q6afe-dai",
> +		.of_match_table = of_match_ptr(q6afe_dai_device_id),
>  	},
>  	.probe = q6afe_dai_dev_probe,
>  	.remove = q6afe_dai_dev_remove,
> -- 
> 2.16.2
> 

I'm not sure if Rob agrees with me or not,
but since this patch is less than 10 lines,
I think that it would be simpler to review
if it was squashed together with the patch
adding the compatible to the DT binding.

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

* Re: [PATCH 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:03     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:03 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:08PM +0100, Srinivas Kandagatla wrote:
> Now that the child nodes have there own compatible strings,
> Use of_platform_populate/depopulate() instead of less common
> of_platform_device_create()/destroy().
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6adm.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c
> index 9983c665a941..dfd5bc3ddd52 100644
> --- a/sound/soc/qcom/qdsp6/q6adm.c
> +++ b/sound/soc/qcom/qdsp6/q6adm.c
> @@ -588,7 +588,6 @@ EXPORT_SYMBOL_GPL(q6adm_close);
>  static int q6adm_probe(struct apr_device *adev)
>  {
>  	struct device *dev = &adev->dev;
> -	struct device_node *dais_np;
>  	struct q6adm *adm;
>  
>  	adm = devm_kzalloc(&adev->dev, sizeof(*adm), GFP_KERNEL);
> @@ -605,22 +604,12 @@ static int q6adm_probe(struct apr_device *adev)
>  	INIT_LIST_HEAD(&adm->copps_list);
>  	spin_lock_init(&adm->copps_list_lock);
>  
> -	dais_np = of_get_child_by_name(dev->of_node, "routing");
> -	if (dais_np) {
> -		adm->pdev_routing = of_platform_device_create(dais_np,
> -							   "q6routing", dev);
> -		of_node_put(dais_np);
> -	}
> -
> -	return 0;
> +	return of_platform_populate(dev->of_node, NULL, NULL, dev);
>  }
>  
>  static int q6adm_remove(struct apr_device *adev)
>  {
> -	struct q6adm *adm = dev_get_drvdata(&adev->dev);
> -
> -	if (adm->pdev_routing)
> -		of_platform_device_destroy(&adm->pdev_routing->dev, NULL);
> +	of_platform_depopulate(&adev->dev);

You can remove pdev_routing from struct q6adm,
since it is no longer in use.

>  
>  	return 0;
>  }
> -- 
> 2.16.2
> 

Since adding the compatible is a prerequisite for using
of_platform_populate()/of_platform_depopulate(),
I think that the patches that make use of
of_platform_populate()/of_platform_depopulate() should
come after the patches that adds the of_table entries.

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

* [PATCH 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
@ 2018-06-25 18:03     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:08PM +0100, Srinivas Kandagatla wrote:
> Now that the child nodes have there own compatible strings,
> Use of_platform_populate/depopulate() instead of less common
> of_platform_device_create()/destroy().
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6adm.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c
> index 9983c665a941..dfd5bc3ddd52 100644
> --- a/sound/soc/qcom/qdsp6/q6adm.c
> +++ b/sound/soc/qcom/qdsp6/q6adm.c
> @@ -588,7 +588,6 @@ EXPORT_SYMBOL_GPL(q6adm_close);
>  static int q6adm_probe(struct apr_device *adev)
>  {
>  	struct device *dev = &adev->dev;
> -	struct device_node *dais_np;
>  	struct q6adm *adm;
>  
>  	adm = devm_kzalloc(&adev->dev, sizeof(*adm), GFP_KERNEL);
> @@ -605,22 +604,12 @@ static int q6adm_probe(struct apr_device *adev)
>  	INIT_LIST_HEAD(&adm->copps_list);
>  	spin_lock_init(&adm->copps_list_lock);
>  
> -	dais_np = of_get_child_by_name(dev->of_node, "routing");
> -	if (dais_np) {
> -		adm->pdev_routing = of_platform_device_create(dais_np,
> -							   "q6routing", dev);
> -		of_node_put(dais_np);
> -	}
> -
> -	return 0;
> +	return of_platform_populate(dev->of_node, NULL, NULL, dev);
>  }
>  
>  static int q6adm_remove(struct apr_device *adev)
>  {
> -	struct q6adm *adm = dev_get_drvdata(&adev->dev);
> -
> -	if (adm->pdev_routing)
> -		of_platform_device_destroy(&adm->pdev_routing->dev, NULL);
> +	of_platform_depopulate(&adev->dev);

You can remove pdev_routing from struct q6adm,
since it is no longer in use.

>  
>  	return 0;
>  }
> -- 
> 2.16.2
> 

Since adding the compatible is a prerequisite for using
of_platform_populate()/of_platform_depopulate(),
I think that the patches that make use of
of_platform_populate()/of_platform_depopulate() should
come after the patches that adds the of_table entries.

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

* Re: [PATCH 10/11] ASoC: qcom: apq8096: remove redundant owner assignment
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:03     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:03 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:14PM +0100, Srinivas Kandagatla wrote:
> module owner is already set in platform_driver_register(), so remove this
> redundant assignment.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/apq8096.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
> index 561cd429e6f2..6e79fec7e789 100644
> --- a/sound/soc/qcom/apq8096.c
> +++ b/sound/soc/qcom/apq8096.c
> @@ -245,7 +245,6 @@ static struct platform_driver msm_snd_apq8096_driver = {
>  	.remove = apq8096_platform_remove,
>  	.driver = {
>  		.name = "msm-snd-apq8096",
> -		.owner = THIS_MODULE,
>  		.of_match_table = msm_snd_apq8096_dt_match,
>  	},
>  };
> -- 
> 2.16.2
> 

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

* [PATCH 10/11] ASoC: qcom: apq8096: remove redundant owner assignment
@ 2018-06-25 18:03     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

On Mon, Jun 25, 2018 at 03:31:14PM +0100, Srinivas Kandagatla wrote:
> module owner is already set in platform_driver_register(), so remove this
> redundant assignment.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/apq8096.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
> index 561cd429e6f2..6e79fec7e789 100644
> --- a/sound/soc/qcom/apq8096.c
> +++ b/sound/soc/qcom/apq8096.c
> @@ -245,7 +245,6 @@ static struct platform_driver msm_snd_apq8096_driver = {
>  	.remove = apq8096_platform_remove,
>  	.driver = {
>  		.name = "msm-snd-apq8096",
> -		.owner = THIS_MODULE,
>  		.of_match_table = msm_snd_apq8096_dt_match,
>  	},
>  };
> -- 
> 2.16.2
> 

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

* Re: [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-25 18:04     ` Niklas Cassel
  -1 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:04 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:15PM +0100, Srinivas Kandagatla wrote:
> q6adm_open can return error pointer or a null in error cases.
> Fix this check this.

Instead of "Fix this check this.", how about "Fix the return handling."

> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6routing.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
> index caf2f847a886..c18f808c7730 100644
> --- a/sound/soc/qcom/qdsp6/q6routing.c
> +++ b/sound/soc/qcom/qdsp6/q6routing.c
> @@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
>  			      session->channels, topology, perf_mode,
>  			      session->bits_per_sample, 0, 0);
>  
> -	if (!copp) {
> +	if (IS_ERR_OR_NULL(copp)) {
>  		mutex_unlock(&routing_data->lock);
>  		return -EINVAL;
>  	}
> -- 
> 2.16.2
> 

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

* [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check
@ 2018-06-25 18:04     ` Niklas Cassel
  0 siblings, 0 replies; 62+ messages in thread
From: Niklas Cassel @ 2018-06-25 18:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 25, 2018 at 03:31:15PM +0100, Srinivas Kandagatla wrote:
> q6adm_open can return error pointer or a null in error cases.
> Fix this check this.

Instead of "Fix this check this.", how about "Fix the return handling."

> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6routing.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
> index caf2f847a886..c18f808c7730 100644
> --- a/sound/soc/qcom/qdsp6/q6routing.c
> +++ b/sound/soc/qcom/qdsp6/q6routing.c
> @@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
>  			      session->channels, topology, perf_mode,
>  			      session->bits_per_sample, 0, 0);
>  
> -	if (!copp) {
> +	if (IS_ERR_OR_NULL(copp)) {
>  		mutex_unlock(&routing_data->lock);
>  		return -EINVAL;
>  	}
> -- 
> 2.16.2
> 

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

* Re: [PATCH 05/11] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
  2018-06-25 18:01     ` Niklas Cassel
@ 2018-06-26  8:52       ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:52 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel



On 25/06/18 19:01, Niklas Cassel wrote:
> On Mon, Jun 25, 2018 at 03:31:09PM +0100, Srinivas Kandagatla wrote:
>> Now that the child nodes have there own compatible strings,
>> Use of_platform_populate/depopulate() instead of less common
>> of_platform_device_create()/destroy().
>>
>> Signed-off-by: Srinivas Kandagatla<srinivas.kandagatla@linaro.org>
>> ---
>>   sound/soc/qcom/qdsp6/q6asm.c | 17 ++---------------
>>   1 file changed, 2 insertions(+), 15 deletions(-)
>>
>> diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
>> index 530852385cad..2b2c7233bb5f 100644
>> --- a/sound/soc/qcom/qdsp6/q6asm.c
>> +++ b/sound/soc/qcom/qdsp6/q6asm.c
>> @@ -174,10 +174,8 @@ struct q6asm {
>>   	struct device *dev;
>>   	struct q6core_svc_api_info ainfo;
>>   	wait_queue_head_t mem_wait;
>> -	struct platform_device *pcmdev;
> Why is this removed?
> If it's a cleanup, perhaps it should be in a separate patch.
Thanks, I will move this to a separate patch.
--srini
> 

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

* [PATCH 05/11] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
@ 2018-06-26  8:52       ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:52 UTC (permalink / raw)
  To: linux-arm-kernel



On 25/06/18 19:01, Niklas Cassel wrote:
> On Mon, Jun 25, 2018 at 03:31:09PM +0100, Srinivas Kandagatla wrote:
>> Now that the child nodes have there own compatible strings,
>> Use of_platform_populate/depopulate() instead of less common
>> of_platform_device_create()/destroy().
>>
>> Signed-off-by: Srinivas Kandagatla<srinivas.kandagatla@linaro.org>
>> ---
>>   sound/soc/qcom/qdsp6/q6asm.c | 17 ++---------------
>>   1 file changed, 2 insertions(+), 15 deletions(-)
>>
>> diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
>> index 530852385cad..2b2c7233bb5f 100644
>> --- a/sound/soc/qcom/qdsp6/q6asm.c
>> +++ b/sound/soc/qcom/qdsp6/q6asm.c
>> @@ -174,10 +174,8 @@ struct q6asm {
>>   	struct device *dev;
>>   	struct q6core_svc_api_info ainfo;
>>   	wait_queue_head_t mem_wait;
>> -	struct platform_device *pcmdev;
> Why is this removed?
> If it's a cleanup, perhaps it should be in a separate patch.
Thanks, I will move this to a separate patch.
--srini
> 

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

* Re: [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check
  2018-06-25 18:04     ` Niklas Cassel
@ 2018-06-26  8:53       ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:53 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel



On 25/06/18 19:04, Niklas Cassel wrote:
> On Mon, Jun 25, 2018 at 03:31:15PM +0100, Srinivas Kandagatla wrote:
>> q6adm_open can return error pointer or a null in error cases.
>> Fix this check this.
> Instead of "Fix this check this.", how about "Fix the return handling."

Thanks,  I will reword this!
--srini
> 

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

* [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check
@ 2018-06-26  8:53       ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:53 UTC (permalink / raw)
  To: linux-arm-kernel



On 25/06/18 19:04, Niklas Cassel wrote:
> On Mon, Jun 25, 2018 at 03:31:15PM +0100, Srinivas Kandagatla wrote:
>> q6adm_open can return error pointer or a null in error cases.
>> Fix this check this.
> Instead of "Fix this check this.", how about "Fix the return handling."

Thanks,  I will reword this!
--srini
> 

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

* Re: [PATCH 03/11] ASoC: q6afe: dt-bindings: add compatible string to dais
  2018-06-25 18:01     ` Niklas Cassel
@ 2018-06-26  8:53       ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:53 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel



On 25/06/18 19:01, Niklas Cassel wrote:
>> @ -103,6 +108,7 @@ q6afe@4 {
>>   		#sound-dai-cells = <1>;
>>   		#address-cells = <1>;
>>   		#size-cells = <0>;
>> +		compatible = "qcom,q6afe-dais";
> Perhaps have the compatible before #sound-dai-cells
> (and #size-cells, #address-cells) like in two previous
> patches.
> 
Sure, Will fix this in next version!
thanks,
srini

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

* [PATCH 03/11] ASoC: q6afe: dt-bindings: add compatible string to dais
@ 2018-06-26  8:53       ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:53 UTC (permalink / raw)
  To: linux-arm-kernel



On 25/06/18 19:01, Niklas Cassel wrote:
>> @ -103,6 +108,7 @@ q6afe at 4 {
>>   		#sound-dai-cells = <1>;
>>   		#address-cells = <1>;
>>   		#size-cells = <0>;
>> +		compatible = "qcom,q6afe-dais";
> Perhaps have the compatible before #sound-dai-cells
> (and #size-cells, #address-cells) like in two previous
> patches.
> 
Sure, Will fix this in next version!
thanks,
srini

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

* Re: [PATCH 07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading
  2018-06-25 18:03     ` Niklas Cassel
@ 2018-06-26  8:56       ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:56 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel



On 25/06/18 19:03, Niklas Cassel wrote:
>> +
> Usually there is no empty line between the table and MODULE_DEVICE_TABLE.
> 
Sure, will do!

thanks,
srini

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

* [PATCH 07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading
@ 2018-06-26  8:56       ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:56 UTC (permalink / raw)
  To: linux-arm-kernel



On 25/06/18 19:03, Niklas Cassel wrote:
>> +
> Usually there is no empty line between the table and MODULE_DEVICE_TABLE.
> 
Sure, will do!

thanks,
srini

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

* Re: [PATCH 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
  2018-06-25 18:03     ` Niklas Cassel
@ 2018-06-26  8:56       ` Srinivas Kandagatla
  -1 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:56 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	lgirdwood, robh+dt, tiwai, broonie, linux-arm-kernel



On 25/06/18 19:03, Niklas Cassel wrote:
> You can remove pdev_routing from struct q6adm,
> since it is no longer in use.
yep, I thought I removed this, but it looks like its still there.
Will fix this in next version.

thanks,
srini

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

* [PATCH 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
@ 2018-06-26  8:56       ` Srinivas Kandagatla
  0 siblings, 0 replies; 62+ messages in thread
From: Srinivas Kandagatla @ 2018-06-26  8:56 UTC (permalink / raw)
  To: linux-arm-kernel



On 25/06/18 19:03, Niklas Cassel wrote:
> You can remove pdev_routing from struct q6adm,
> since it is no longer in use.
yep, I thought I removed this, but it looks like its still there.
Will fix this in next version.

thanks,
srini

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

* Applied "ASoC: qdsp6: q6routing: add proper error check" to the asoc tree
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-26 15:10     ` Mark Brown
  -1 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:10 UTC (permalink / raw)
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	tiwai, robh+dt, lgirdwood, broonie, srinivas.kandagatla,
	niklas.cassel, linux-arm-kernel

The patch

   ASoC: qdsp6: q6routing: add proper error check

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 972562f7aaaa261ec6e1ac14fed0c5bdd0dfb1cb Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:15 +0100
Subject: [PATCH] ASoC: qdsp6: q6routing: add proper error check

q6adm_open can return error pointer or a null in error cases.
Fix the return handling.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/qcom/qdsp6/q6routing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
index ab696bf8d1d3..c80fdbc2442e 100644
--- a/sound/soc/qcom/qdsp6/q6routing.c
+++ b/sound/soc/qcom/qdsp6/q6routing.c
@@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
 			      session->channels, topology, perf_mode,
 			      session->bits_per_sample, 0, 0);
 
-	if (!copp) {
+	if (IS_ERR_OR_NULL(copp)) {
 		mutex_unlock(&routing_data->lock);
 		return -EINVAL;
 	}
-- 
2.17.1

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

* Applied "ASoC: qdsp6: q6routing: add proper error check" to the asoc tree
@ 2018-06-26 15:10     ` Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: qdsp6: q6routing: add proper error check

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 972562f7aaaa261ec6e1ac14fed0c5bdd0dfb1cb Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:15 +0100
Subject: [PATCH] ASoC: qdsp6: q6routing: add proper error check

q6adm_open can return error pointer or a null in error cases.
Fix the return handling.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/qcom/qdsp6/q6routing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
index ab696bf8d1d3..c80fdbc2442e 100644
--- a/sound/soc/qcom/qdsp6/q6routing.c
+++ b/sound/soc/qcom/qdsp6/q6routing.c
@@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
 			      session->channels, topology, perf_mode,
 			      session->bits_per_sample, 0, 0);
 
-	if (!copp) {
+	if (IS_ERR_OR_NULL(copp)) {
 		mutex_unlock(&routing_data->lock);
 		return -EINVAL;
 	}
-- 
2.17.1

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

* Applied "ASoC: qcom: apq8096: remove redundant owner assignment" to the asoc tree
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-26 15:10     ` Mark Brown
  -1 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:10 UTC (permalink / raw)
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	tiwai, robh+dt, lgirdwood, broonie, srinivas.kandagatla,
	niklas.cassel, linux-arm-kernel

The patch

   ASoC: qcom: apq8096: remove redundant owner assignment

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 2d12c20b98ad610892151da37367f2d018181455 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:14 +0100
Subject: [PATCH] ASoC: qcom: apq8096: remove redundant owner assignment

module owner is already set in platform_driver_register(), so remove this
redundant assignment.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/qcom/apq8096.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
index 239b8cb77bdb..cab8c4ff7c00 100644
--- a/sound/soc/qcom/apq8096.c
+++ b/sound/soc/qcom/apq8096.c
@@ -246,7 +246,6 @@ static struct platform_driver msm_snd_apq8096_driver = {
 	.remove = apq8096_platform_remove,
 	.driver = {
 		.name = "msm-snd-apq8096",
-		.owner = THIS_MODULE,
 		.of_match_table = msm_snd_apq8096_dt_match,
 	},
 };
-- 
2.17.1

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

* Applied "ASoC: qcom: apq8096: remove redundant owner assignment" to the asoc tree
@ 2018-06-26 15:10     ` Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: qcom: apq8096: remove redundant owner assignment

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 2d12c20b98ad610892151da37367f2d018181455 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:14 +0100
Subject: [PATCH] ASoC: qcom: apq8096: remove redundant owner assignment

module owner is already set in platform_driver_register(), so remove this
redundant assignment.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/qcom/apq8096.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
index 239b8cb77bdb..cab8c4ff7c00 100644
--- a/sound/soc/qcom/apq8096.c
+++ b/sound/soc/qcom/apq8096.c
@@ -246,7 +246,6 @@ static struct platform_driver msm_snd_apq8096_driver = {
 	.remove = apq8096_platform_remove,
 	.driver = {
 		.name = "msm-snd-apq8096",
-		.owner = THIS_MODULE,
 		.of_match_table = msm_snd_apq8096_dt_match,
 	},
 };
-- 
2.17.1

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

* Applied "ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()" to the asoc tree
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-26 15:11     ` Mark Brown
  -1 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:11 UTC (permalink / raw)
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	tiwai, robh+dt, lgirdwood, broonie, srinivas.kandagatla,
	niklas.cassel, linux-arm-kernel

The patch

   ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 01afbd45f78cb0557db18c3ba768eea3e9576cfd Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:10 +0100
Subject: [PATCH] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/qcom/qdsp6/q6afe.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 01f43218984b..621b67b34db9 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -316,7 +316,6 @@ struct q6afe {
 	struct mutex lock;
 	struct list_head port_list;
 	spinlock_t port_list_lock;
-	struct platform_device *pdev_dais;
 };
 
 struct afe_port_cmd_device_start {
@@ -1438,7 +1437,6 @@ static int q6afe_probe(struct apr_device *adev)
 {
 	struct q6afe *afe;
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 
 	afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL);
 	if (!afe)
@@ -1453,22 +1451,12 @@ static int q6afe_probe(struct apr_device *adev)
 
 	dev_set_drvdata(dev, afe);
 
-	dais_np = of_get_child_by_name(dev->of_node, "dais");
-	if (dais_np) {
-		afe->pdev_dais = of_platform_device_create(dais_np,
-							   "q6afe-dai", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6afe_remove(struct apr_device *adev)
 {
-	struct q6afe *afe = dev_get_drvdata(&adev->dev);
-
-	if (afe->pdev_dais)
-		of_platform_device_destroy(&afe->pdev_dais->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.17.1

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

* Applied "ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()" to the asoc tree
@ 2018-06-26 15:11     ` Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:11 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 01afbd45f78cb0557db18c3ba768eea3e9576cfd Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:10 +0100
Subject: [PATCH] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/qcom/qdsp6/q6afe.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 01f43218984b..621b67b34db9 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -316,7 +316,6 @@ struct q6afe {
 	struct mutex lock;
 	struct list_head port_list;
 	spinlock_t port_list_lock;
-	struct platform_device *pdev_dais;
 };
 
 struct afe_port_cmd_device_start {
@@ -1438,7 +1437,6 @@ static int q6afe_probe(struct apr_device *adev)
 {
 	struct q6afe *afe;
 	struct device *dev = &adev->dev;
-	struct device_node *dais_np;
 
 	afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL);
 	if (!afe)
@@ -1453,22 +1451,12 @@ static int q6afe_probe(struct apr_device *adev)
 
 	dev_set_drvdata(dev, afe);
 
-	dais_np = of_get_child_by_name(dev->of_node, "dais");
-	if (dais_np) {
-		afe->pdev_dais = of_platform_device_create(dais_np,
-							   "q6afe-dai", dev);
-		of_node_put(dais_np);
-	}
-
-	return 0;
+	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
 static int q6afe_remove(struct apr_device *adev)
 {
-	struct q6afe *afe = dev_get_drvdata(&adev->dev);
-
-	if (afe->pdev_dais)
-		of_platform_device_destroy(&afe->pdev_dais->dev, NULL);
+	of_platform_depopulate(&adev->dev);
 
 	return 0;
 }
-- 
2.17.1

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

* Applied "ASoC: q6asm: dt-bindings: add compatible string to dais" to the asoc tree
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-26 15:11     ` Mark Brown
  -1 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:11 UTC (permalink / raw)
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	tiwai, robh+dt, lgirdwood, broonie, srinivas.kandagatla,
	niklas.cassel, linux-arm-kernel

The patch

   ASoC: q6asm: dt-bindings: add compatible string to dais

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 9618b706672db1b595c7076389a833078335417c Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:06 +0100
Subject: [PATCH] ASoC: q6asm: dt-bindings: add compatible string to dais

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
index 2178eb91146f..f9c7bd8c1bc0 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
@@ -17,6 +17,11 @@ used by the apr service device.
 = ASM DAIs (Digial Audio Interface)
 "dais" subnode of the ASM node represents dai specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6asm-dais".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6asm@7 {
 	compatible = "qcom,q6asm";
 	reg = <APR_SVC_ASM>;
 	q6asmdai: dais {
+		compatible = "qcom,q6asm-dais";
 		#sound-dai-cells = <1>;
 	};
 };
-- 
2.17.1

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

* Applied "ASoC: q6asm: dt-bindings: add compatible string to dais" to the asoc tree
@ 2018-06-26 15:11     ` Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:11 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: q6asm: dt-bindings: add compatible string to dais

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 9618b706672db1b595c7076389a833078335417c Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:06 +0100
Subject: [PATCH] ASoC: q6asm: dt-bindings: add compatible string to dais

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
index 2178eb91146f..f9c7bd8c1bc0 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
@@ -17,6 +17,11 @@ used by the apr service device.
 = ASM DAIs (Digial Audio Interface)
 "dais" subnode of the ASM node represents dai specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6asm-dais".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6asm at 7 {
 	compatible = "qcom,q6asm";
 	reg = <APR_SVC_ASM>;
 	q6asmdai: dais {
+		compatible = "qcom,q6asm-dais";
 		#sound-dai-cells = <1>;
 	};
 };
-- 
2.17.1

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

* Applied "ASoC: q6adm: dt-bindings: add compatible string to routing" to the asoc tree
  2018-06-25 14:31   ` Srinivas Kandagatla
@ 2018-06-26 15:11     ` Mark Brown
  -1 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:11 UTC (permalink / raw)
  Cc: rohkumar, devicetree, alsa-devel, bgoswami, linux-arm-msm, plai,
	tiwai, robh+dt, lgirdwood, broonie, srinivas.kandagatla,
	niklas.cassel, linux-arm-kernel

The patch

   ASoC: q6adm: dt-bindings: add compatible string to routing

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From c486a185744c593417a126aebb119771c1bbe670 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:05 +0100
Subject: [PATCH] ASoC: q6adm: dt-bindings: add compatible string to routing

Add compatible string to routing so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6adm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
index cb709e5dbc44..bbae426cdfb1 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
@@ -18,6 +18,11 @@ used by the apr service device.
 = ADM routing
 "routing" subnode of the ADM node represents adm routing specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6adm-routing".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6adm@8 {
 	compatible = "qcom,q6adm";
 	reg = <APR_SVC_ADM>;
 	q6routing: routing {
+		compatible = "qcom,q6adm-routing";
 		#sound-dai-cells = <0>;
 	};
 };
-- 
2.17.1

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

* Applied "ASoC: q6adm: dt-bindings: add compatible string to routing" to the asoc tree
@ 2018-06-26 15:11     ` Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2018-06-26 15:11 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   ASoC: q6adm: dt-bindings: add compatible string to routing

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From c486a185744c593417a126aebb119771c1bbe670 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Tue, 26 Jun 2018 10:20:05 +0100
Subject: [PATCH] ASoC: q6adm: dt-bindings: add compatible string to routing

Add compatible string to routing so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/sound/qcom,q6adm.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
index cb709e5dbc44..bbae426cdfb1 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
@@ -18,6 +18,11 @@ used by the apr service device.
 = ADM routing
 "routing" subnode of the ADM node represents adm routing specific configuration
 
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6adm-routing".
+
 - #sound-dai-cells
 	Usage: required
 	Value type: <u32>
@@ -28,6 +33,7 @@ q6adm at 8 {
 	compatible = "qcom,q6adm";
 	reg = <APR_SVC_ADM>;
 	q6routing: routing {
+		compatible = "qcom,q6adm-routing";
 		#sound-dai-cells = <0>;
 	};
 };
-- 
2.17.1

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

end of thread, other threads:[~2018-06-26 15:11 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 14:31 [PATCH 00/11] ASoC: qdsp6: Fix dt based module loading Srinivas Kandagatla
2018-06-25 14:31 ` Srinivas Kandagatla
2018-06-25 14:31 ` [PATCH 01/11] ASoC: q6adm: dt-bindings: add compatible string to routing Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 17:59   ` Niklas Cassel
2018-06-25 17:59     ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: q6adm: dt-bindings: add compatible string to routing" to the asoc tree Mark Brown
2018-06-26 15:11     ` Mark Brown
2018-06-25 14:31 ` [PATCH 02/11] ASoC: q6asm: dt-bindings: add compatible string to dais Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:00   ` Niklas Cassel
2018-06-25 18:00     ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: q6asm: dt-bindings: add compatible string to dais" to the asoc tree Mark Brown
2018-06-26 15:11     ` Mark Brown
2018-06-25 14:31 ` [PATCH 03/11] ASoC: q6afe: dt-bindings: add compatible string to dais Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:01   ` Niklas Cassel
2018-06-25 18:01     ` Niklas Cassel
2018-06-26  8:53     ` Srinivas Kandagatla
2018-06-26  8:53       ` Srinivas Kandagatla
2018-06-25 14:31 ` [PATCH 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate() Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:03   ` Niklas Cassel
2018-06-25 18:03     ` Niklas Cassel
2018-06-26  8:56     ` Srinivas Kandagatla
2018-06-26  8:56       ` Srinivas Kandagatla
2018-06-25 14:31 ` [PATCH 05/11] ASoC: qdsp6: q6asm: " Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:01   ` Niklas Cassel
2018-06-25 18:01     ` Niklas Cassel
2018-06-26  8:52     ` Srinivas Kandagatla
2018-06-26  8:52       ` Srinivas Kandagatla
2018-06-25 14:31 ` [PATCH 06/11] ASoC: qdsp6: q6afe: " Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:02   ` Niklas Cassel
2018-06-25 18:02     ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()" to the asoc tree Mark Brown
2018-06-26 15:11     ` Mark Brown
2018-06-25 14:31 ` [PATCH 07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:03   ` Niklas Cassel
2018-06-25 18:03     ` Niklas Cassel
2018-06-26  8:56     ` Srinivas Kandagatla
2018-06-26  8:56       ` Srinivas Kandagatla
2018-06-25 14:31 ` [PATCH 08/11] ASoC: qdsp6: q6asm-dai: " Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 14:31 ` [PATCH 09/11] ASoC: qdsp6: q6routing: " Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 14:31 ` [PATCH 10/11] ASoC: qcom: apq8096: remove redundant owner assignment Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:03   ` Niklas Cassel
2018-06-25 18:03     ` Niklas Cassel
2018-06-26 15:10   ` Applied "ASoC: qcom: apq8096: remove redundant owner assignment" to the asoc tree Mark Brown
2018-06-26 15:10     ` Mark Brown
2018-06-25 14:31 ` [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check Srinivas Kandagatla
2018-06-25 14:31   ` Srinivas Kandagatla
2018-06-25 18:04   ` Niklas Cassel
2018-06-25 18:04     ` Niklas Cassel
2018-06-26  8:53     ` Srinivas Kandagatla
2018-06-26  8:53       ` Srinivas Kandagatla
2018-06-26 15:10   ` Applied "ASoC: qdsp6: q6routing: add proper error check" to the asoc tree Mark Brown
2018-06-26 15:10     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.