mach-jive: convert to spi_gpio

Rather than the deprecated spi_s3c24xx_gpio driver. Compile tested only.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
Peter Korsgaard 2011-06-28 14:49:13 +02:00 committed by Grant Likely
parent a2274cedc4
commit 932036ce03
1 changed files with 14 additions and 27 deletions

View File

@ -25,6 +25,7 @@
#include <video/ili9320.h> #include <video/ili9320.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
@ -38,7 +39,6 @@
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <mach/regs-mem.h> #include <mach/regs-mem.h>
#include <mach/regs-lcd.h> #include <mach/regs-lcd.h>
#include <mach/spi-gpio.h>
#include <mach/fb.h> #include <mach/fb.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
@ -389,45 +389,30 @@ static struct ili9320_platdata jive_lcm_config = {
/* LCD SPI support */ /* LCD SPI support */
static void jive_lcd_spi_chipselect(struct s3c2410_spigpio_info *spi, int cs) static struct spi_gpio_platform_data jive_lcd_spi = {
{ .sck = S3C2410_GPG(8),
gpio_set_value(S3C2410_GPB(7), cs ? 0 : 1); .mosi = S3C2410_GPB(8),
} .miso = SPI_GPIO_NO_MISO,
static struct s3c2410_spigpio_info jive_lcd_spi = {
.bus_num = 1,
.pin_clk = S3C2410_GPG(8),
.pin_mosi = S3C2410_GPB(8),
.num_chipselect = 1,
.chip_select = jive_lcd_spi_chipselect,
}; };
static struct platform_device jive_device_lcdspi = { static struct platform_device jive_device_lcdspi = {
.name = "spi_s3c24xx_gpio", .name = "spi-gpio",
.id = 1, .id = 1,
.num_resources = 0,
.dev.platform_data = &jive_lcd_spi, .dev.platform_data = &jive_lcd_spi,
}; };
/* WM8750 audio code SPI definition */ /* WM8750 audio code SPI definition */
static void jive_wm8750_chipselect(struct s3c2410_spigpio_info *spi, int cs) static struct spi_gpio_platform_data jive_wm8750_spi = {
{ .sck = S3C2410_GPB(4),
gpio_set_value(S3C2410_GPH(10), cs ? 0 : 1); .mosi = S3C2410_GPB(9),
} .miso = SPI_GPIO_NO_MISO,
static struct s3c2410_spigpio_info jive_wm8750_spi = {
.bus_num = 2,
.pin_clk = S3C2410_GPB(4),
.pin_mosi = S3C2410_GPB(9),
.num_chipselect = 1,
.chip_select = jive_wm8750_chipselect,
}; };
static struct platform_device jive_device_wm8750 = { static struct platform_device jive_device_wm8750 = {
.name = "spi_s3c24xx_gpio", .name = "spi-gpio",
.id = 2, .id = 2,
.num_resources = 0,
.dev.platform_data = &jive_wm8750_spi, .dev.platform_data = &jive_wm8750_spi,
}; };
@ -441,12 +426,14 @@ static struct spi_board_info __initdata jive_spi_devs[] = {
.mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */ .mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */
.max_speed_hz = 100000, .max_speed_hz = 100000,
.platform_data = &jive_lcm_config, .platform_data = &jive_lcm_config,
.controller_data = (void *)S3C2410_GPB(7),
}, { }, {
.modalias = "WM8750", .modalias = "WM8750",
.bus_num = 2, .bus_num = 2,
.chip_select = 0, .chip_select = 0,
.mode = SPI_MODE_0, /* CPOL=0, CPHA=0 */ .mode = SPI_MODE_0, /* CPOL=0, CPHA=0 */
.max_speed_hz = 100000, .max_speed_hz = 100000,
.controller_data = (void *)S3C2410_GPH(10),
}, },
}; };