diff options
-rw-r--r-- | arch/arm/mach-omap2/twl-common.c | 27 | ||||
-rw-r--r-- | arch/arm/mach-omap2/twl-common.h | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index de47f170ba50..0606f238a247 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -537,3 +537,30 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
537 | pmic_data->v2v1 = &omap4_v2v1_idata; | 537 | pmic_data->v2v1 = &omap4_v2v1_idata; |
538 | } | 538 | } |
539 | #endif /* CONFIG_ARCH_OMAP4 */ | 539 | #endif /* CONFIG_ARCH_OMAP4 */ |
540 | |||
541 | #if defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030) || \ | ||
542 | defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE) | ||
543 | #include <linux/platform_data/omap-twl4030.h> | ||
544 | |||
545 | static struct omap_tw4030_pdata omap_twl4030_audio_data; | ||
546 | |||
547 | static struct platform_device audio_device = { | ||
548 | .name = "omap-twl4030", | ||
549 | .id = -1, | ||
550 | .dev = { | ||
551 | .platform_data = &omap_twl4030_audio_data, | ||
552 | }, | ||
553 | }; | ||
554 | |||
555 | void __init omap_twl4030_audio_init(char *card_name) | ||
556 | { | ||
557 | omap_twl4030_audio_data.card_name = card_name; | ||
558 | platform_device_register(&audio_device); | ||
559 | } | ||
560 | |||
561 | #else /* SOC_OMAP_TWL4030 */ | ||
562 | void __init omap_twl4030_audio_init(char *card_name, int codec_sysclk) | ||
563 | { | ||
564 | return; | ||
565 | } | ||
566 | #endif /* SOC_OMAP_TWL4030 */ | ||
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h index 8fe71cfd002c..cb25b43317a7 100644 --- a/arch/arm/mach-omap2/twl-common.h +++ b/arch/arm/mach-omap2/twl-common.h | |||
@@ -59,4 +59,6 @@ void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
59 | void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | 59 | void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, |
60 | u32 pdata_flags, u32 regulators_flags); | 60 | u32 pdata_flags, u32 regulators_flags); |
61 | 61 | ||
62 | void omap_twl4030_audio_init(char *card_name); | ||
63 | |||
62 | #endif /* __OMAP_PMIC_COMMON__ */ | 64 | #endif /* __OMAP_PMIC_COMMON__ */ |