Commit 0f7f3d1f authored by Jyri Sarha's avatar Jyri Sarha Committed by Mark Brown

ASoC: hdmi-codec: Add devicetree binding with documentation

Signed-off-by: default avatarJyri Sarha <jsarha@ti.com>
cc: bcousson@baylibre.com
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c600e953
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";
};
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <sound/soc.h> #include <sound/soc.h>
#include <linux/of_device.h>
#define DRV_NAME "hdmi-audio-codec" #define DRV_NAME "hdmi-audio-codec"
...@@ -60,6 +61,14 @@ static struct snd_soc_dai_driver hdmi_codec_dai = { ...@@ -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 = { static struct snd_soc_codec_driver hdmi_codec = {
.dapm_widgets = hdmi_widgets, .dapm_widgets = hdmi_widgets,
.num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),
...@@ -83,6 +92,7 @@ static struct platform_driver hdmi_codec_driver = { ...@@ -83,6 +92,7 @@ static struct platform_driver hdmi_codec_driver = {
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(hdmi_audio_codec_ids),
}, },
.probe = hdmi_codec_probe, .probe = hdmi_codec_probe,
......
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