From 42c78b2bf51bafb4cfa98dfecc28dd9b8bcd04b0 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Mon, 6 Apr 2009 19:00:51 -0700 Subject: Blackfin SPI Driver: Add GPIO controlled SPI Slave Select support Add support for GPIO controlled SPI Chip Selects. To make use of this feature, set chip_select = 0 and add a proper cs_gpio to your controller_data. struct spi_board_info .chip_select = 0 struct bfin5xx_spi_chip .cs_gpio = GPIO_P### There are various SPI devices that require SPI MODE_0, and need to have the Chip Selects asserted during the entire transfer. Consider using SPI_MODE_3 (SPI_CPHA | SPI_CPOL) if your device allows it. Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/blackfin/include/asm/bfin5xx_spi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/blackfin/include') diff --git a/arch/blackfin/include/asm/bfin5xx_spi.h b/arch/blackfin/include/asm/bfin5xx_spi.h index ea2d24af954..8c5f8a977a6 100644 --- a/arch/blackfin/include/asm/bfin5xx_spi.h +++ b/arch/blackfin/include/asm/bfin5xx_spi.h @@ -124,6 +124,7 @@ struct bfin5xx_spi_chip { u8 bits_per_word; u8 cs_change_per_word; u16 cs_chg_udelay; /* Some devices require 16-bit delays */ + u32 cs_gpio; }; #endif /* _SPI_CHANNEL_H_ */ -- cgit v1.2.3