ASoC: hdmi-codec: Add devicetree binding with documentation
authorJyri Sarha <jsarha@ti.com>
Fri, 20 Dec 2013 10:40:16 +0000 (12:40 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 31 Dec 2013 13:26:44 +0000 (13:26 +0000)
Signed-off-by: Jyri Sarha <jsarha@ti.com>
cc: bcousson@baylibre.com
Signed-off-by: Mark Brown <broonie@linaro.org>
Documentation/devicetree/bindings/sound/hdmi.txt [new file with mode: 0644]
sound/soc/codecs/hdmi.c

diff --git a/Documentation/devicetree/bindings/sound/hdmi.txt b/Documentation/devicetree/bindings/sound/hdmi.txt
new file mode 100644 (file)
index 0000000..31af7bc
--- /dev/null
@@ -0,0 +1,17 @@
+Device-Tree bindings for dummy HDMI codec
+
+Required properties:
+       - compatible: should be "linux,hdmi-audio".
+
+CODEC output pins:
+  * TX
+
+CODEC input pins:
+  * RX
+
+Example node:
+
+       hdmi_audio: hdmi_audio@0 {
+               compatible = "linux,hdmi-audio";
+               status = "okay";
+       };
index 32797a8e4ee957a17a2d0fb9161766cc0db15082..9cb1c7d3e1dca6dafbeaf1247c2bccf073212061 100644 (file)
@@ -20,6 +20,7 @@
  */
 #include <linux/module.h>
 #include <sound/soc.h>
+#include <linux/of_device.h>
 
 #define DRV_NAME "hdmi-audio-codec"
 
@@ -60,6 +61,14 @@ static struct snd_soc_dai_driver hdmi_codec_dai = {
 
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id hdmi_audio_codec_ids[] = {
+       { .compatible = "linux,hdmi-audio", },
+       { }
+};
+MODULE_DEVICE_TABLE(of, hdmi_audio_codec_ids);
+#endif
+
 static struct snd_soc_codec_driver hdmi_codec = {
        .dapm_widgets = hdmi_widgets,
        .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),
@@ -83,6 +92,7 @@ static struct platform_driver hdmi_codec_driver = {
        .driver         = {
                .name   = DRV_NAME,
                .owner  = THIS_MODULE,
+               .of_match_table = of_match_ptr(hdmi_audio_codec_ids),
        },
 
        .probe          = hdmi_codec_probe,