aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2412/mach-jive.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-07-03 06:24:34 -0400
committerBen Dooks <ben-linux@fluff.org>2008-07-03 11:51:26 -0400
commitfd2de272b23bbb866294ff72f55d3731fe6a4c92 (patch)
treea7bddbeb64707f18b8542aae622a6227fee1d2f9 /arch/arm/mach-s3c2412/mach-jive.c
parentc2c1708f9d2d0435ff136acbb98f8cfbeded09e4 (diff)
[ARM] JIVE: Add board definitions for audio
Add board definitions for the audio device connected on the Logitech Jive. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2412/mach-jive.c')
-rw-r--r--arch/arm/mach-s3c2412/mach-jive.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index 71bf9000e253..2e6350d68779 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -409,8 +409,28 @@ static struct platform_device jive_device_lcdspi = {
409 .dev.platform_data = &jive_lcd_spi, 409 .dev.platform_data = &jive_lcd_spi,
410}; 410};
411 411
412/* JIVE SPI devices. */ 412/* WM8750 audio code SPI definition */
413
414static void jive_wm8750_chipselect(struct s3c2410_spigpio_info *spi, int cs)
415{
416 s3c2410_gpio_setpin(S3C2410_GPH10, cs ? 0 : 1);
417}
418
419static struct s3c2410_spigpio_info jive_wm8750_spi = {
420 .bus_num = 2,
421 .pin_clk = S3C2410_GPB4,
422 .pin_mosi = S3C2410_GPB9,
423 .chip_select = jive_wm8750_chipselect,
424};
425
426static struct platform_device jive_device_wm8750 = {
427 .name = "s3c24xx-spi-gpio",
428 .id = 2,
429 .num_resources = 0,
430 .dev.platform_data = &jive_wm8750_spi,
431};
413 432
433/* JIVE SPI devices. */
414 434
415static struct spi_board_info __initdata jive_spi_devs[] = { 435static struct spi_board_info __initdata jive_spi_devs[] = {
416 [0] = { 436 [0] = {
@@ -420,10 +440,15 @@ static struct spi_board_info __initdata jive_spi_devs[] = {
420 .mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */ 440 .mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */
421 .max_speed_hz = 100000, 441 .max_speed_hz = 100000,
422 .platform_data = &jive_lcm_config, 442 .platform_data = &jive_lcm_config,
443 }, {
444 .modalias = "WM8750",
445 .bus_num = 2,
446 .chip_select = 0,
447 .mode = SPI_MODE_0, /* CPOL=0, CPHA=0 */
448 .max_speed_hz = 100000,
423 }, 449 },
424}; 450};
425 451
426
427static struct platform_device *jive_devices[] __initdata = { 452static struct platform_device *jive_devices[] __initdata = {
428 &s3c_device_usb, 453 &s3c_device_usb,
429 &s3c_device_rtc, 454 &s3c_device_rtc,
@@ -431,6 +456,7 @@ static struct platform_device *jive_devices[] __initdata = {
431 &s3c_device_i2c, 456 &s3c_device_i2c,
432 &s3c_device_lcd, 457 &s3c_device_lcd,
433 &jive_device_lcdspi, 458 &jive_device_lcdspi,
459 &jive_device_wm8750,
434 &s3c_device_nand, 460 &s3c_device_nand,
435 &s3c_device_usbgadget, 461 &s3c_device_usbgadget,
436}; 462};
@@ -595,6 +621,11 @@ static void __init jive_machine_init(void)
595 s3c2410_gpio_setpin(S3C2410_GPG8, 1); 621 s3c2410_gpio_setpin(S3C2410_GPG8, 1);
596 s3c2410_gpio_cfgpin(S3C2410_GPG8, S3C2410_GPIO_OUTPUT); 622 s3c2410_gpio_cfgpin(S3C2410_GPG8, S3C2410_GPIO_OUTPUT);
597 623
624 /* initialise the WM8750 spi */
625
626 s3c2410_gpio_setpin(S3C2410_GPH10, 1);
627 s3c2410_gpio_cfgpin(S3C2410_GPH10, S3C2410_GPIO_OUTPUT);
628
598 /* Turn off suspend on both USB ports, and switch the 629 /* Turn off suspend on both USB ports, and switch the
599 * selectable USB port to USB device mode. */ 630 * selectable USB port to USB device mode. */
600 631