Commit ba47644d authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

spi: sun4i: Set bits_per_word_mask to only support 8 bits word length

This controller only supports 8 bits word length.
Set bits_per_word_mask so spi core will reject transfers that attempt to use
an unsupported bits_per_word value.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent b5f65179
...@@ -392,6 +392,7 @@ static int sun4i_spi_probe(struct platform_device *pdev) ...@@ -392,6 +392,7 @@ static int sun4i_spi_probe(struct platform_device *pdev)
master->transfer_one = sun4i_spi_transfer_one; master->transfer_one = sun4i_spi_transfer_one;
master->num_chipselect = 4; master->num_chipselect = 4;
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
master->bits_per_word_mask = SPI_BPW_MASK(8);
master->dev.of_node = pdev->dev.of_node; master->dev.of_node = pdev->dev.of_node;
master->auto_runtime_pm = true; master->auto_runtime_pm = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment