diff options
author | Timur Tabi <timur@freescale.com> | 2010-08-04 17:51:08 -0500 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-08-12 14:00:17 +0100 |
commit | ff71334a46844d0ae6ff0055c549790bcd27bb10 (patch) | |
tree | 08c04a7d44c17737bd19a3b29571fd3e99946dda | |
parent | 87a0632b29410bab5c1783d7eb979c8d942d4209 (diff) | |
download | op-kernel-dev-ff71334a46844d0ae6ff0055c549790bcd27bb10.zip op-kernel-dev-ff71334a46844d0ae6ff0055c549790bcd27bb10.tar.gz |
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>
-rw-r--r-- | arch/powerpc/boot/dts/mpc8610_hpcd.dts | 1 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 9535ce6..83c3218 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -286,6 +286,7 @@ ssi@16100 { compatible = "fsl,mpc8610-ssi"; + status = "disabled"; cell-index = <1>; reg = <0x16100 0x100>; interrupt-parent = <&mpic>; diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 00e3e62..7939c33 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, 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")) { |