aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2010-08-04 18:51:08 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-08-12 09:00:17 -0400
commitff71334a46844d0ae6ff0055c549790bcd27bb10 (patch)
tree08c04a7d44c17737bd19a3b29571fd3e99946dda /sound
parent87a0632b29410bab5c1783d7eb979c8d942d4209 (diff)
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. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_ssi.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 00e3e625b52a..7939c337ed9d 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -625,12 +625,19 @@ static int __devinit fsl_ssi_probe(struct of_device *of_dev,
625 struct resource res; 625 struct resource res;
626 char name[64]; 626 char name[64];
627 627
628 /* We are only interested in SSIs with a codec phandle in them, so let's 628 /* SSIs that are not connected on the board should have a
629 * make sure this SSI has one. 629 * status = "disabled"
630 * property in their device tree nodes.
630 */ 631 */
631 if (!of_get_property(np, "codec-handle", NULL)) 632 if (!of_device_is_available(np))
632 return -ENODEV; 633 return -ENODEV;
633 634
635 /* Check for a codec-handle property. */
636 if (!of_get_property(np, "codec-handle", NULL)) {
637 dev_err(&of_dev->dev, "missing codec-handle property\n");
638 return -ENODEV;
639 }
640
634 /* We only support the SSI in "I2S Slave" mode */ 641 /* We only support the SSI in "I2S Slave" mode */
635 sprop = of_get_property(np, "fsl,mode", NULL); 642 sprop = of_get_property(np, "fsl,mode", NULL);
636 if (!sprop || strcmp(sprop, "i2s-slave")) { 643 if (!sprop || strcmp(sprop, "i2s-slave")) {