]> git.baikalelectronics.ru Git - kernel.git/commitdiff
spi: nuc900: Fix mode_bits setting
authorAxel Lin <axel.lin@ingics.com>
Thu, 15 Aug 2013 06:11:21 +0000 (14:11 +0800)
committerMark Brown <broonie@linaro.org>
Thu, 29 Aug 2013 12:40:48 +0000 (13:40 +0100)
The code in nuc900_slave_select() supports handling SPI_CS_HIGH.
Thus set SPI_CS_HIGH bit in master->mode_bits to make it work.
Otherwise, spi_setup() will return unsupported mode bits error message if
SPI_CS_HIGH is set in the mode field of struct spi_device.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-nuc900.c

index 150d85453c27d2c2d5347402113cc52547180db4..ee0136631c00729a3e601f09c281d110a10962ee 100644 (file)
@@ -373,7 +373,7 @@ static int nuc900_spi_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, hw);
        init_completion(&hw->done);
 
-       master->mode_bits          = SPI_MODE_0;
+       master->mode_bits          = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
        master->num_chipselect     = hw->pdata->num_cs;
        master->bus_num            = hw->pdata->bus_num;
        hw->bitbang.master         = hw->master;