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.

[PATCH] spi_s3c2410_gpio.c spi mode 2 and 3 support

Add transfer modes 2 and 3 to the S3C24XX gpio SPI driver

Signed-off-by: Harald Welte <laforge@openmoko.org>
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>

authored by

Harald Welte and committed by
Linus Torvalds
d23c6c21 bb2d1c36

+15
+15
drivers/spi/spi_s3c24xx_gpio.c
··· 73 73 return bitbang_txrx_be_cpha1(spi, nsecs, 0, word, bits); 74 74 } 75 75 76 + static u32 s3c2410_spigpio_txrx_mode2(struct spi_device *spi, 77 + unsigned nsecs, u32 word, u8 bits) 78 + { 79 + return bitbang_txrx_be_cpha0(spi, nsecs, 1, word, bits); 80 + } 81 + 82 + static u32 s3c2410_spigpio_txrx_mode3(struct spi_device *spi, 83 + unsigned nsecs, u32 word, u8 bits) 84 + { 85 + return bitbang_txrx_be_cpha1(spi, nsecs, 1, word, bits); 86 + } 87 + 88 + 76 89 static void s3c2410_spigpio_chipselect(struct spi_device *dev, int value) 77 90 { 78 91 struct s3c2410_spigpio *sg = spidev_to_sg(dev); ··· 121 108 122 109 sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0; 123 110 sp->bitbang.txrx_word[SPI_MODE_1] = s3c2410_spigpio_txrx_mode1; 111 + sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2; 112 + sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3; 124 113 125 114 /* set state of spi pins */ 126 115 s3c2410_gpio_setpin(sp->info->pin_clk, 0);