diff options
author | Bo Shen <voice.shen@atmel.com> | 2012-10-10 22:38:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-06 04:11:33 -0500 |
commit | bac91462e8a8609d7be02a2cbf5c2b406b04ed9f (patch) | |
tree | 1ed58249628cbe0724be14166699dd4192ab9c32 /arch/arm/mach-at91 | |
parent | 242b9bb83e458ddc6205265eafb8770c3dedd009 (diff) |
ASoC: sam9g20: using platform device for audio part
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9g20ek.c | 17 |
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index a76b8684f52d..0f24cfb9e54a 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -768,6 +768,14 @@ static inline void configure_ssc_pins(unsigned pins) | |||
768 | at91_set_A_periph(AT91_PIN_PB21, 1); | 768 | at91_set_A_periph(AT91_PIN_PB21, 1); |
769 | } | 769 | } |
770 | 770 | ||
771 | static struct platform_device at91sam9260_ssc_dai_device = { | ||
772 | .name = "atmel-ssc-dai", | ||
773 | .id = 0, | ||
774 | .dev = { | ||
775 | .parent = &(at91sam9260_ssc_device.dev), | ||
776 | }, | ||
777 | }; | ||
778 | |||
771 | /* | 779 | /* |
772 | * SSC controllers are accessed through library code, instead of any | 780 | * SSC controllers are accessed through library code, instead of any |
773 | * kind of all-singing/all-dancing driver. For example one could be | 781 | * kind of all-singing/all-dancing driver. For example one could be |
@@ -792,6 +800,7 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
792 | } | 800 | } |
793 | 801 | ||
794 | platform_device_register(pdev); | 802 | platform_device_register(pdev); |
803 | platform_device_register(&at91sam9260_ssc_dai_device); | ||
795 | } | 804 | } |
796 | 805 | ||
797 | #else | 806 | #else |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 3ab2b86a3762..5b6a6f9a94f4 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -353,6 +353,22 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { | |||
353 | }, | 353 | }, |
354 | }; | 354 | }; |
355 | 355 | ||
356 | static struct platform_device sam9g20ek_pcm_device = { | ||
357 | .name = "atmel-pcm-audio", | ||
358 | .id = -1, | ||
359 | }; | ||
360 | |||
361 | static struct platform_device sam9g20ek_audio_device = { | ||
362 | .name = "at91sam9g20ek-audio", | ||
363 | .id = -1, | ||
364 | }; | ||
365 | |||
366 | static void __init ek_add_device_audio(void) | ||
367 | { | ||
368 | platform_device_register(&sam9g20ek_pcm_device); | ||
369 | platform_device_register(&sam9g20ek_audio_device); | ||
370 | } | ||
371 | |||
356 | 372 | ||
357 | static void __init ek_board_init(void) | 373 | static void __init ek_board_init(void) |
358 | { | 374 | { |
@@ -394,6 +410,7 @@ static void __init ek_board_init(void) | |||
394 | at91_set_B_periph(AT91_PIN_PC1, 0); | 410 | at91_set_B_periph(AT91_PIN_PC1, 0); |
395 | /* SSC (for WM8731) */ | 411 | /* SSC (for WM8731) */ |
396 | at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); | 412 | at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); |
413 | ek_add_device_audio(); | ||
397 | } | 414 | } |
398 | 415 | ||
399 | MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") | 416 | MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") |