summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri@ti.com>2012-04-23 08:54:34 +0800
committerAndy Green <andy.green@linaro.org>2012-06-21 17:54:01 +0800
commit2c963fa702cb8bcc4eb3a580e05e3304df4911b2 (patch)
tree98d67865d3011cb2a6a7b38ccc5ed6542bc1bd98
parent52e11574dd0af173df80eb1d3c55673dcb9457c2 (diff)
ARM: OMAP: devices: Register platform devices for HDMI audio
Add platform registration for the devices HDMI audio support. The omap-hdmi-audio-dai platform device is to be used by the ASoC HDMI CPU DAI driver. The omap-hdmi-audio platform device is to be used by the ASoC HDMI machine driver that links together the ASOC CPU DAI, ASoC plaform and ASoC codec drivers. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
-rw-r--r--arch/arm/mach-omap2/devices.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 61ba82a4c93..a7b35d8c06d 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -495,6 +495,36 @@ static void omap_init_aess(void)
static inline void omap_init_aess(void) {}
#endif
+#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
+ defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
+
+static struct platform_device omap_hdmi_audio = {
+ .name = "omap-hdmi-audio",
+ .id = -1,
+};
+
+static void __init omap_init_hdmi_audio(void)
+{
+ struct omap_hwmod *oh;
+ struct platform_device *pdev;
+
+ oh = omap_hwmod_lookup("dss_hdmi");
+ if (!oh) {
+ printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
+ return;
+ }
+
+ pdev = omap_device_build("omap-hdmi-audio-dai",
+ -1, oh, NULL, 0, NULL, 0, 0);
+ WARN(IS_ERR(pdev),
+ "Can't build omap_device for omap-hdmi-audio-dai.\n");
+
+ platform_device_register(&omap_hdmi_audio);
+}
+#else
+static inline void omap_init_hdmi_audio(void) {}
+#endif
+
#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
#include <plat/mcspi.h>
@@ -1057,6 +1087,7 @@ static int __init omap2_init_devices(void)
omap_init_mcpdm();
omap_init_camera();
omap3_init_camera(&bogus_isp_pdata);
+ omap_init_hdmi_audio();
omap_init_mbox();
omap_init_mcspi();
omap_init_pmu();