Skip to content

Commit

Permalink
[ARM] JIVE: Add board definitions for audio
Browse files Browse the repository at this point in the history
Add board definitions for the audio device connected
on the Logitech Jive.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Ben Dooks committed Jul 3, 2008
1 parent c2c1708 commit fd2de27
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions arch/arm/mach-s3c2412/mach-jive.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,28 @@ static struct platform_device jive_device_lcdspi = {
.dev.platform_data = &jive_lcd_spi,
};

/* JIVE SPI devices. */
/* WM8750 audio code SPI definition */

static void jive_wm8750_chipselect(struct s3c2410_spigpio_info *spi, int cs)
{
s3c2410_gpio_setpin(S3C2410_GPH10, cs ? 0 : 1);
}

static struct s3c2410_spigpio_info jive_wm8750_spi = {
.bus_num = 2,
.pin_clk = S3C2410_GPB4,
.pin_mosi = S3C2410_GPB9,
.chip_select = jive_wm8750_chipselect,
};

static struct platform_device jive_device_wm8750 = {
.name = "s3c24xx-spi-gpio",
.id = 2,
.num_resources = 0,
.dev.platform_data = &jive_wm8750_spi,
};

/* JIVE SPI devices. */

static struct spi_board_info __initdata jive_spi_devs[] = {
[0] = {
Expand All @@ -420,17 +440,23 @@ static struct spi_board_info __initdata jive_spi_devs[] = {
.mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */
.max_speed_hz = 100000,
.platform_data = &jive_lcm_config,
}, {
.modalias = "WM8750",
.bus_num = 2,
.chip_select = 0,
.mode = SPI_MODE_0, /* CPOL=0, CPHA=0 */
.max_speed_hz = 100000,
},
};


static struct platform_device *jive_devices[] __initdata = {
&s3c_device_usb,
&s3c_device_rtc,
&s3c_device_wdt,
&s3c_device_i2c,
&s3c_device_lcd,
&jive_device_lcdspi,
&jive_device_wm8750,
&s3c_device_nand,
&s3c_device_usbgadget,
};
Expand Down Expand Up @@ -595,6 +621,11 @@ static void __init jive_machine_init(void)
s3c2410_gpio_setpin(S3C2410_GPG8, 1);
s3c2410_gpio_cfgpin(S3C2410_GPG8, S3C2410_GPIO_OUTPUT);

/* initialise the WM8750 spi */

s3c2410_gpio_setpin(S3C2410_GPH10, 1);
s3c2410_gpio_cfgpin(S3C2410_GPH10, S3C2410_GPIO_OUTPUT);

/* Turn off suspend on both USB ports, and switch the
* selectable USB port to USB device mode. */

Expand Down

0 comments on commit fd2de27

Please sign in to comment.