Skip to content

Commit

Permalink
spi: fix spi_s3c24xx_gpio num_chipselect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Dec 2, 2008
1 parent e39ea8a commit b93c35f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-s3c2410/include/mach/spi-gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct s3c2410_spigpio_info {
unsigned long pin_mosi;
unsigned long pin_miso;

int num_chipselect;
int bus_num;

void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs);
Expand Down
1 change: 1 addition & 0 deletions drivers/spi/spi_s3c24xx_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static int s3c2410_spigpio_probe(struct platform_device *dev)
/* setup spi bitbang adaptor */
sp->bitbang.master = spi_master_get(master);
sp->bitbang.master->bus_num = info->bus_num;
sp->bitbang.master->num_chipselect = info->num_chipselect;
sp->bitbang.chipselect = s3c2410_spigpio_chipselect;

sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0;
Expand Down

0 comments on commit b93c35f

Please sign in to comment.