diff options
-rw-r--r-- | drivers/spi/spi-bcm2835.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 8de1925fe554..3f93718aad3f 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c | |||
@@ -67,7 +67,8 @@ | |||
67 | #define BCM2835_SPI_CS_CS_01 0x00000001 | 67 | #define BCM2835_SPI_CS_CS_01 0x00000001 |
68 | 68 | ||
69 | #define BCM2835_SPI_TIMEOUT_MS 30000 | 69 | #define BCM2835_SPI_TIMEOUT_MS 30000 |
70 | #define BCM2835_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_NO_CS) | 70 | #define BCM2835_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH \ |
71 | | SPI_NO_CS | SPI_3WIRE) | ||
71 | 72 | ||
72 | #define DRV_NAME "spi-bcm2835" | 73 | #define DRV_NAME "spi-bcm2835" |
73 | 74 | ||
@@ -163,6 +164,9 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi, | |||
163 | cdiv = 0; /* 0 is the slowest we can go */ | 164 | cdiv = 0; /* 0 is the slowest we can go */ |
164 | } | 165 | } |
165 | 166 | ||
167 | if ((spi->mode & SPI_3WIRE) && (tfr->rx_buf)) | ||
168 | cs |= BCM2835_SPI_CS_REN; | ||
169 | |||
166 | if (spi->mode & SPI_CPOL) | 170 | if (spi->mode & SPI_CPOL) |
167 | cs |= BCM2835_SPI_CS_CPOL; | 171 | cs |= BCM2835_SPI_CS_CPOL; |
168 | if (spi->mode & SPI_CPHA) | 172 | if (spi->mode & SPI_CPHA) |