Skip to content

Commit

Permalink
spi: sun6i: Set bits_per_word_mask to only support 8 bits word length
Browse files Browse the repository at this point in the history
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: Axel Lin <axel.lin@ingics.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 4, 2014
1 parent ba47644 commit 743a46b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi-sun6i.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ static int sun6i_spi_probe(struct platform_device *pdev)
master->transfer_one = sun6i_spi_transfer_one;
master->num_chipselect = 4;
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->auto_runtime_pm = true;

Expand Down

0 comments on commit 743a46b

Please sign in to comment.