spi: fix spi_s3c24xx_gpio num_chipselect
Subsystems (4)
PATCH 2/3 spi: fix spi_s3c24xx_gpio num_chipselect
From: Ben Dooks <[email protected]>
The spi master driver must have num_chipselect set to allow the bus to initialise. Pass this through the platform data.
--- arch/arm/mach-s3c2410/include/mach/spi-gpio.h | 1 + drivers/spi/spi_s3c24xx_gpio.c | 1 + 2 files changed, 2 insertions(+)
arch/arm/mach-s3c2410/include/mach/spi-gpio.h +1 -0
@@ -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);
drivers/spi/spi_s3c24xx_gpio.c +1 -0
@@ -118,6 +118,7 @@ static int s3c2410_spigpio_probe(struct/* 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;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
A message that is not in the archive (sent off-list or not yet received): 200811221219.12473.david-b-yBeKhBN/[email protected]
Quoted 26 lines · On Sat, 22 Nov 2008 12:19:12 -0800 David Brownell…
From: Ben Dooks <[email protected]>
The spi master driver must have
num_chipselectset to allow the bus to initialise. Pass this through the platform data.Signed-off-by Ben Dooks <[email protected]>Signed-off-by David Brownell <[email protected]>--- arch/arm/mach-s3c2410/include/mach/spi-gpio.h | 1 + drivers/spi/spi_s3c24xx_gpio.c | 1 + 2 files changed, 2 insertions(+)arch/arm/mach-s3c2410/include/mach/spi-gpio.h +1
-0@@ -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);
drivers/spi/spi_s3c24xx_gpio.c static int s3c2410_spigpio_probe(struct · line 124
Quoted 7 lines
drivers/spi/spi_s3c24xx_gpio.c +1
-0@@ -118,6 +118,7 @@ static int s3c2410_spigpio_probe(struct/* 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;
What are the consequences of not having this fix in one's kernel?
(ie: which kernel versions need this fix?)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
A message that is not in the archive (sent off-list or not yet received): 20081122131750.e1c031e2.akpm-de/[email protected]
Quoted 3 lines · Andrew Morton
What are the consequences of not having this fix in one's kernel?
(ie: which kernel versions need this fix?)
Adapter won't register; so, 2.6.28 (or 2.6.8 if you believe $SUBJECT) for sure.
This driver predates 082c8cb4e5e68c0fd29cc10c59db94d2284fd2b0 which fixed a bug in the SPI framework that would have hidden this; that merged in 2.6.23, so this particular issue has been lurking for a while. I'm guessing most folk have used the "native" driver on those s3c chips.
- Dave
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/