diff options
| author | Jyri Sarha <jsarha@ti.com> | 2013-12-20 05:40:16 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-12-31 08:26:44 -0500 |
| commit | 0f7f3d1f17c2e4d73e449e6acb2007b13813c58e (patch) | |
| tree | 6108bb07c203215a6a4e45f436e840214278ae6f | |
| parent | c600e95360dac3a3b88f0a2106214dff8e5f56be (diff) | |
ASoC: hdmi-codec: Add devicetree binding with documentation
Signed-off-by: Jyri Sarha <jsarha@ti.com>
cc: bcousson@baylibre.com
Signed-off-by: Mark Brown <broonie@linaro.org>
| -rw-r--r-- | Documentation/devicetree/bindings/sound/hdmi.txt | 17 | ||||
| -rw-r--r-- | sound/soc/codecs/hdmi.c | 10 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/hdmi.txt b/Documentation/devicetree/bindings/sound/hdmi.txt new file mode 100644 index 000000000000..31af7bca3099 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/hdmi.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Device-Tree bindings for dummy HDMI codec | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "linux,hdmi-audio". | ||
| 5 | |||
| 6 | CODEC output pins: | ||
| 7 | * TX | ||
| 8 | |||
| 9 | CODEC input pins: | ||
| 10 | * RX | ||
| 11 | |||
| 12 | Example node: | ||
| 13 | |||
| 14 | hdmi_audio: hdmi_audio@0 { | ||
| 15 | compatible = "linux,hdmi-audio"; | ||
| 16 | status = "okay"; | ||
| 17 | }; | ||
diff --git a/sound/soc/codecs/hdmi.c b/sound/soc/codecs/hdmi.c index 32797a8e4ee9..9cb1c7d3e1dc 100644 --- a/sound/soc/codecs/hdmi.c +++ b/sound/soc/codecs/hdmi.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | */ | 20 | */ |
| 21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
| 22 | #include <sound/soc.h> | 22 | #include <sound/soc.h> |
| 23 | #include <linux/of_device.h> | ||
| 23 | 24 | ||
| 24 | #define DRV_NAME "hdmi-audio-codec" | 25 | #define DRV_NAME "hdmi-audio-codec" |
| 25 | 26 | ||
| @@ -60,6 +61,14 @@ static struct snd_soc_dai_driver hdmi_codec_dai = { | |||
| 60 | 61 | ||
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| 64 | #ifdef CONFIG_OF | ||
| 65 | static const struct of_device_id hdmi_audio_codec_ids[] = { | ||
| 66 | { .compatible = "linux,hdmi-audio", }, | ||
| 67 | { } | ||
| 68 | }; | ||
| 69 | MODULE_DEVICE_TABLE(of, hdmi_audio_codec_ids); | ||
| 70 | #endif | ||
| 71 | |||
| 63 | static struct snd_soc_codec_driver hdmi_codec = { | 72 | static struct snd_soc_codec_driver hdmi_codec = { |
| 64 | .dapm_widgets = hdmi_widgets, | 73 | .dapm_widgets = hdmi_widgets, |
| 65 | .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), | 74 | .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), |
| @@ -83,6 +92,7 @@ static struct platform_driver hdmi_codec_driver = { | |||
| 83 | .driver = { | 92 | .driver = { |
| 84 | .name = DRV_NAME, | 93 | .name = DRV_NAME, |
| 85 | .owner = THIS_MODULE, | 94 | .owner = THIS_MODULE, |
| 95 | .of_match_table = of_match_ptr(hdmi_audio_codec_ids), | ||
| 86 | }, | 96 | }, |
| 87 | 97 | ||
| 88 | .probe = hdmi_codec_probe, | 98 | .probe = hdmi_codec_probe, |
