diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-12-05 13:45:23 (GMT) |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2013-01-22 09:34:50 (GMT) |
commit | 40234bf733042eb4343cb47c816619758e477eeb (patch) | |
tree | 8ef9db0274dd96b47a7a72297a24f3b9be6a417c /arch/arm/mach-omap2/twl-common.c | |
parent | 02553f5ac2b3e7d0405e5a51d87ef0727ad6fb2f (diff) | |
download | linux-40234bf733042eb4343cb47c816619758e477eeb.tar.xz |
ARM: OMAP2+: twl-common: Allow boards to customize the twl4030 audio setup
Boards with special audio routing can pass a custom omap_tw4030_pdata to the
audio machine driver.
At the same time update the board files using the same audio driver.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/twl-common.c')
-rw-r--r-- | arch/arm/mach-omap2/twl-common.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index cd1cba8..931495a 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c @@ -529,28 +529,28 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, #include <linux/platform_data/omap-twl4030.h> /* Commonly used configuration */ -static struct omap_tw4030_pdata omap_twl4030_audio_data = { - .has_hs = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, - .has_hf = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, - .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, -}; +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) +void __init omap_twl4030_audio_init(char *card_name, + struct omap_tw4030_pdata *pdata) { - omap_twl4030_audio_data.card_name = card_name; + if (!pdata) + pdata = &omap_twl4030_audio_data; + + pdata->card_name = card_name; + + audio_device.dev.platform_data = pdata; platform_device_register(&audio_device); } #else /* SOC_OMAP_TWL4030 */ -void __init omap_twl4030_audio_init(char *card_name) +void __init omap_twl4030_audio_init(char *card_name, + struct omap_tw4030_pdata *pdata) { return; } |