aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-03-02 09:25:10 -0500
committerMark Brown <broonie@linaro.org>2014-03-03 22:08:05 -0500
commitba47644d5b79914fe53b69c639902afce8ccfe7f (patch)
treecca45521dca99665ed433e54b0927a7eb6c77791 /drivers/spi
parentb5f6517948cce50bde9aa441b4f00b63518f6421 (diff)
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: Axel Lin <axel.lin@ingics.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-sun4i.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index 3f82705d0a27..d266a8702067 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -392,6 +392,7 @@ static int sun4i_spi_probe(struct platform_device *pdev)
392 master->transfer_one = sun4i_spi_transfer_one; 392 master->transfer_one = sun4i_spi_transfer_one;
393 master->num_chipselect = 4; 393 master->num_chipselect = 4;
394 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; 394 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
395 master->bits_per_word_mask = SPI_BPW_MASK(8);
395 master->dev.of_node = pdev->dev.of_node; 396 master->dev.of_node = pdev->dev.of_node;
396 master->auto_runtime_pm = true; 397 master->auto_runtime_pm = true;
397 398