diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-12-13 13:48:54 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-12-13 13:48:54 -0500 |
commit | de9eb09726130dadc3e611c97fa2d753620662c1 (patch) | |
tree | d1addfce5e5e2764942dd0c52fd40da67daf504a /arch/arm/mach-omap2/devices.c | |
parent | ef211dc626beb47fc11d4aba27a8c1b20a4b3b4a (diff) |
ARM: OMAP4: devices: Register OMAP4 DMIC platform device
Add platform device registration for OMAP4 DMIC.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@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 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index c15cfada5f13..35d5dffab7e1 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -336,6 +336,27 @@ static void omap_init_mcpdm(void) | |||
336 | static inline void omap_init_mcpdm(void) {} | 336 | static inline void omap_init_mcpdm(void) {} |
337 | #endif | 337 | #endif |
338 | 338 | ||
339 | #if defined(CONFIG_SND_OMAP_SOC_DMIC) || \ | ||
340 | defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE) | ||
341 | |||
342 | static void omap_init_dmic(void) | ||
343 | { | ||
344 | struct omap_hwmod *oh; | ||
345 | struct platform_device *pdev; | ||
346 | |||
347 | oh = omap_hwmod_lookup("dmic"); | ||
348 | if (!oh) { | ||
349 | printk(KERN_ERR "Could not look up mcpdm hw_mod\n"); | ||
350 | return; | ||
351 | } | ||
352 | |||
353 | pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0, NULL, 0, 0); | ||
354 | WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n"); | ||
355 | } | ||
356 | #else | ||
357 | static inline void omap_init_dmic(void) {} | ||
358 | #endif | ||
359 | |||
339 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) | 360 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) |
340 | 361 | ||
341 | #include <plat/mcspi.h> | 362 | #include <plat/mcspi.h> |
@@ -681,6 +702,7 @@ static int __init omap2_init_devices(void) | |||
681 | */ | 702 | */ |
682 | omap_init_audio(); | 703 | omap_init_audio(); |
683 | omap_init_mcpdm(); | 704 | omap_init_mcpdm(); |
705 | omap_init_dmic(); | ||
684 | omap_init_camera(); | 706 | omap_init_camera(); |
685 | omap_init_mbox(); | 707 | omap_init_mbox(); |
686 | omap_init_mcspi(); | 708 | omap_init_mcspi(); |