Skip to contentSkip to conversation

asoc/multi-component: fsl: add support for disabled SSI nodes

PATCH Applied Timur Tabi 4 participants 4 messages Aug 4, 2010 – Aug 5, 2010

Subsystems (5)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 1/1 asoc/multi-component: fsl: add support for disabled SSI nodes

Add support for adding "status = disabled" to an SSI node to incidate that it is not wired on the board. This replaces the not-so-intuitive previous method of omitting a codec-handle property.

---

Kumar, would you please ACK the device-tree portion of this patch? I want it to go through the ALSA tree.

 arch/powerpc/boot/dts/mpc8610_hpcd.dts |    1 +
 sound/soc/fsl/fsl_ssi.c                |   13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
arch/powerpc/boot/dts/mpc8610_hpcd.dts +1 -0
index 9535ce6..83c3218 100644
@@ -286,6 +286,7 @@
 
 		ssi@16100 {
 			compatible = "fsl,mpc8610-ssi";
+			status = "disabled";
 			cell-index = <1>;
 			reg = <0x16100 0x100>;
 			interrupt-parent = <&mpic>;
sound/soc/fsl/fsl_ssi.c +10 -3
index a0e18b8..45d27b1 100644
@@ -636,12 +636,19 @@ static int __devinit fsl_ssi_probe(struct of_device *of_dev,
 	struct resource res;
 	char name[64];
 
-	/* We are only interested in SSIs with a codec phandle in them, so let's
-	 * make sure this SSI has one.
+	/* SSIs that are not connected on the board should have a
+	 *      status = "disabled"
+	 * property in their device tree nodes.
 	 */
-	if (!of_get_property(np, "codec-handle", NULL))
+	if (!of_device_is_available(np))
 		return -ENODEV;
 
+	/* Check for a codec-handle property. */
+	if (!of_get_property(np, "codec-handle", NULL)) {
+		dev_err(&of_dev->dev, "missing codec-handle property\n");
+		return -ENODEV;
+	}
+
 	/* We only support the SSI in "I2S Slave" mode */
 	sprop = of_get_property(np, "fsl,mode", NULL);
 	if (!sprop || strcmp(sprop, "i2s-slave")) {
Signature · 1 line
1.7.0.1
Acked-by on v1 1/1
#3 lore raw
In reply to Timur Tabi
Quoted 5 lines · Timur Tabi

Add support for adding "status = disabled" to an SSI node to incidate that it is not wired on the board. This replaces the not-so-intuitive previous method of omitting a codec-handle property.

Quoted 8 lines

---

Kumar, would you please ACK the device-tree portion of this patch? I want it to go through the ALSA tree.

arch/powerpc/boot/dts/mpc8610_hpcd.dts | 1 +
sound/soc/fsl/fsl_ssi.c | 13 ++++++++++---

2 files changed, 11 insertions(+), 3 deletions(-)

- k