Skip to content

Commit

Permalink
ASoC: hdmi-codec: Add devicetree binding with documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Jyri Sarha <[email protected]>
cc: [email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Jyri Sarha authored and broonie committed Dec 31, 2013
1 parent c600e95 commit 0f7f3d1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/sound/hdmi.txt
Original file line number Diff line number Diff line change
@@ -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";
};
10 changes: 10 additions & 0 deletions sound/soc/codecs/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/
#include <linux/module.h>
#include <sound/soc.h>
#include <linux/of_device.h>

#define DRV_NAME "hdmi-audio-codec"

Expand Down Expand Up @@ -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),
Expand All @@ -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,
Expand Down

0 comments on commit 0f7f3d1

Please sign in to comment.