Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: spi_s3c24xx must initialize num_chipselect

The SPI core now expects num_chipselect to be set correctly as due to added
checks on the chip being selected before an transfer is allowed. This patch
adds a num_cs field to the platform data which needs to be set correctly
before adding the SPI platform device.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ben Dooks and committed by
Linus Torvalds
d1e77806 50f426b5

+5
+4
drivers/spi/spi_s3c24xx.c
··· 267 267 platform_set_drvdata(pdev, hw); 268 268 init_completion(&hw->done); 269 269 270 + /* setup the master state. */ 271 + 272 + master->num_chipselect = hw->pdata->num_cs; 273 + 270 274 /* setup the state for the bitbang driver */ 271 275 272 276 hw->bitbang.master = hw->master;
+1
include/asm-arm/arch-s3c2410/spi.h
··· 15 15 16 16 struct s3c2410_spi_info { 17 17 unsigned long pin_cs; /* simple gpio cs */ 18 + unsigned int num_cs; /* total chipselects */ 18 19 19 20 void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); 20 21 };