diff options
author | Cezary Gapinski <cezary.gapinski@gmail.com> | 2018-12-24 23:00:31 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-01-07 19:24:17 +0100 |
commit | d6cea11b092a2c28ecf8371c093214cbb112e926 (patch) | |
tree | 4cec5c306e71b317d3f96d17f96772377ee51f99 /drivers/spi/spi-stm32.c | |
parent | spi: fix typo in SPI_STM32 help text (diff) | |
download | linux-d6cea11b092a2c28ecf8371c093214cbb112e926.tar.xz linux-d6cea11b092a2c28ecf8371c093214cbb112e926.zip |
spi: stm32: use explicit CPOL and CPHA mode bits
Driver supports SPI mode 0 to 3 not only the mode 3.
Use SPI_CPOL and SPI_CPHA indicates that these bits
can be changed to obtain modes 0 - 3.
Signed-off-by: Cezary Gapinski <cezary.gapinski@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-stm32.c')
-rw-r--r-- | drivers/spi/spi-stm32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 8310f14fe273..f7056b767477 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -1142,7 +1142,7 @@ static int stm32_spi_probe(struct platform_device *pdev) master->dev.of_node = pdev->dev.of_node; master->auto_runtime_pm = true; master->bus_num = pdev->id; - master->mode_bits = SPI_MODE_3 | SPI_CS_HIGH | SPI_LSB_FIRST | + master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | SPI_LSB_FIRST | SPI_3WIRE | SPI_LOOP; master->bits_per_word_mask = stm32_spi_get_bpw_mask(spi); master->max_speed_hz = spi->clk_rate / SPI_MBR_DIV_MIN; |