diff options
author | Ricardo Neri <ricardo.neri@ti.com> | 2012-05-09 17:19:14 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-05-09 17:19:14 -0400 |
commit | 5eeec215869cf7533d5180edcdf580a92cf50f66 (patch) | |
tree | 28961a79fca7706cd66249f1f4752ddf29593fa0 /arch/arm/mach-omap2/devices.c | |
parent | a42cf2c6c6ea0ec0237d555b95467c149e20e696 (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>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index e4336035c0ea..17dacefaa7ef 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -355,6 +355,36 @@ static void __init omap_init_dmic(void) | |||
355 | static inline void omap_init_dmic(void) {} | 355 | static inline void omap_init_dmic(void) {} |
356 | #endif | 356 | #endif |
357 | 357 | ||
358 | #if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \ | ||
359 | defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE) | ||
360 | |||
361 | static struct platform_device omap_hdmi_audio = { | ||
362 | .name = "omap-hdmi-audio", | ||
363 | .id = -1, | ||
364 | }; | ||
365 | |||
366 | static void __init omap_init_hdmi_audio(void) | ||
367 | { | ||
368 | struct omap_hwmod *oh; | ||
369 | struct platform_device *pdev; | ||
370 | |||
371 | oh = omap_hwmod_lookup("dss_hdmi"); | ||
372 | if (!oh) { | ||
373 | printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n"); | ||
374 | return; | ||
375 | } | ||
376 | |||
377 | pdev = omap_device_build("omap-hdmi-audio-dai", | ||
378 | -1, oh, NULL, 0, NULL, 0, 0); | ||
379 | WARN(IS_ERR(pdev), | ||
380 | "Can't build omap_device for omap-hdmi-audio-dai.\n"); | ||
381 | |||
382 | platform_device_register(&omap_hdmi_audio); | ||
383 | } | ||
384 | #else | ||
385 | static inline void omap_init_hdmi_audio(void) {} | ||
386 | #endif | ||
387 | |||
358 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) | 388 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) |
359 | 389 | ||
360 | #include <plat/mcspi.h> | 390 | #include <plat/mcspi.h> |
@@ -704,6 +734,7 @@ static int __init omap2_init_devices(void) | |||
704 | omap_init_mcpdm(); | 734 | omap_init_mcpdm(); |
705 | omap_init_dmic(); | 735 | omap_init_dmic(); |
706 | omap_init_camera(); | 736 | omap_init_camera(); |
737 | omap_init_hdmi_audio(); | ||
707 | omap_init_mbox(); | 738 | omap_init_mbox(); |
708 | omap_init_mcspi(); | 739 | omap_init_mcspi(); |
709 | omap_init_pmu(); | 740 | omap_init_pmu(); |