Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[linux-3.10.git] / arch / arm / mach-omap2 / twl-common.c
index 45f7741..18a8519 100644 (file)
@@ -519,3 +519,30 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
                pmic_data->v2v1 = &omap4_v2v1_idata;
 }
 #endif /* CONFIG_ARCH_OMAP4 */
+
+#if defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030) || \
+       defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE)
+#include <linux/platform_data/omap-twl4030.h>
+
+static struct omap_tw4030_pdata omap_twl4030_audio_data;
+
+static struct platform_device audio_device = {
+       .name           = "omap-twl4030",
+       .id             = -1,
+       .dev = {
+               .platform_data = &omap_twl4030_audio_data,
+       },
+};
+
+void __init omap_twl4030_audio_init(char *card_name)
+{
+       omap_twl4030_audio_data.card_name = card_name;
+       platform_device_register(&audio_device);
+}
+
+#else /* SOC_OMAP_TWL4030 */
+void __init omap_twl4030_audio_init(char *card_name)
+{
+       return;
+}
+#endif /* SOC_OMAP_TWL4030 */