]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
spi: S3C2410: add bus number to SPI GPIO driver
authorDavid Brownell <david-b@pacbell.net>
Thu, 29 Nov 2007 00:21:30 +0000 (16:21 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 29 Nov 2007 17:24:52 +0000 (09:24 -0800)
Allow passing a bus number through the platform data for the S3C2410 SPI
GPIO driver.   This is needed to support multiple SPI busses.

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>
drivers/spi/spi_s3c24xx_gpio.c
include/asm-arm/arch-s3c2410/spi-gpio.h

index d59105dc308b08c97cba9d860f75a44f7f4f7d47..109d82c1abc05a9844578df75f72ad2f80af03ee 100644 (file)
@@ -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.chipselect = s3c2410_spigpio_chipselect;
 
        sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0;
index c1e4db7c971039e95b51c4b1db733b32b8cea458..ba1dca88d48069dcb59040001b796c4b6c24399e 100644 (file)
@@ -21,6 +21,8 @@ struct s3c2410_spigpio_info {
        unsigned long            pin_mosi;
        unsigned long            pin_miso;
 
+       int                      bus_num;
+
        unsigned long            board_size;
        struct spi_board_info   *board_info;