diff options
| author | Axel Lin <axel.lin@ingics.com> | 2014-01-20 10:22:07 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-02-04 15:32:58 -0500 |
| commit | f7db1588d6028c97c098bb6445eaabc56a25fed8 (patch) | |
| tree | 1e7a7c103c3a982e36b84ac7fcc9dc62f1398ec2 | |
| parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) | |
spi: nuc900: Set SPI_LSB_FIRST for master->mode_bits if hw->pdata->lsb is true
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>
Cc: stable@vger.kernel.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 50406306bc20..bae97ffec4b9 100644 --- a/drivers/spi/spi-nuc900.c +++ b/drivers/spi/spi-nuc900.c | |||
| @@ -361,6 +361,8 @@ static int nuc900_spi_probe(struct platform_device *pdev) | |||
| 361 | init_completion(&hw->done); | 361 | init_completion(&hw->done); |
| 362 | 362 | ||
| 363 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; | 363 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; |
| 364 | if (hw->pdata->lsb) | ||
| 365 | master->mode_bits |= SPI_LSB_FIRST; | ||
| 364 | master->num_chipselect = hw->pdata->num_cs; | 366 | master->num_chipselect = hw->pdata->num_cs; |
| 365 | master->bus_num = hw->pdata->bus_num; | 367 | master->bus_num = hw->pdata->bus_num; |
| 366 | hw->bitbang.master = hw->master; | 368 | hw->bitbang.master = hw->master; |
