aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-12-01 16:13:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-01 22:55:24 -0500
commitb93c35ff39d19f20c47c06c206986afefecc777a (patch)
tree3f5cb5f35923478ee6b725fbf3fcec8928466725
parente39ea8a2def1fcb203ed0183317124348962e351 (diff)
spi: fix spi_s3c24xx_gpio num_chipselect
The spi master driver must have num_chipselect set to allow the bus to initialise. Pass this through the platform data. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/arm/mach-s3c2410/include/mach/spi-gpio.h1
-rw-r--r--drivers/spi/spi_s3c24xx_gpio.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/spi-gpio.h b/arch/arm/mach-s3c2410/include/mach/spi-gpio.h
index 3fe8be9ca110..980a099e209c 100644
--- a/arch/arm/mach-s3c2410/include/mach/spi-gpio.h
+++ b/arch/arm/mach-s3c2410/include/mach/spi-gpio.h
@@ -18,6 +18,7 @@ struct s3c2410_spigpio_info {
18 unsigned long pin_mosi; 18 unsigned long pin_mosi;
19 unsigned long pin_miso; 19 unsigned long pin_miso;
20 20
21 int num_chipselect;
21 int bus_num; 22 int bus_num;
22 23
23 void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs); 24 void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs);
diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c
index 8bb2b4ee3e50..f2447a5476bb 100644
--- a/drivers/spi/spi_s3c24xx_gpio.c
+++ b/drivers/spi/spi_s3c24xx_gpio.c
@@ -118,6 +118,7 @@ static int s3c2410_spigpio_probe(struct platform_device *dev)
118 /* setup spi bitbang adaptor */ 118 /* setup spi bitbang adaptor */
119 sp->bitbang.master = spi_master_get(master); 119 sp->bitbang.master = spi_master_get(master);
120 sp->bitbang.master->bus_num = info->bus_num; 120 sp->bitbang.master->bus_num = info->bus_num;
121 sp->bitbang.master->num_chipselect = info->num_chipselect;
121 sp->bitbang.chipselect = s3c2410_spigpio_chipselect; 122 sp->bitbang.chipselect = s3c2410_spigpio_chipselect;
122 123
123 sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0; 124 sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0;