diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-01-20 23:22:07 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-22 13:32:26 -0800 |
commit | 2376a9891b6658971bcc5c467acf3772f8a33eda (patch) | |
tree | 63538034e4f45bb4ca03357fcb8d9fdf607284e6 | |
parent | 639558a469aacd66b586a52656e9d14e350483e4 (diff) |
spi: nuc900: Set SPI_LSB_FIRST for master->mode_bits if hw->pdata->lsb is true
commit f7db1588d6028c97c098bb6445eaabc56a25fed8 upstream.
Otherwise, spi_setup() fails with unsupported mode bits message.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/spi/spi-nuc900.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index 47a68b43bcd..ba4e99a3732 100644 --- a/drivers/spi/spi-nuc900.c +++ b/drivers/spi/spi-nuc900.c @@ -363,6 +363,8 @@ static int nuc900_spi_probe(struct platform_device *pdev) init_completion(&hw->done); master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; + if (hw->pdata->lsb) + master->mode_bits |= SPI_LSB_FIRST; master->num_chipselect = hw->pdata->num_cs; master->bus_num = hw->pdata->bus_num; hw->bitbang.master = hw->master; |