Commit ff71334a authored by Timur Tabi's avatar Timur Tabi Committed by Liam Girdwood

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: default avatarTimur Tabi <timur@freescale.com>
Acked-by: default avatarKumar Gala <galak@kernel.crashing.org>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 87a0632b
......@@ -286,6 +286,7 @@ ssi@16000 {
ssi@16100 {
compatible = "fsl,mpc8610-ssi";
status = "disabled";
cell-index = <1>;
reg = <0x16100 0x100>;
interrupt-parent = <&mpic>;
......
......@@ -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")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment