From: Axel Lin Date: Sun, 2 Mar 2014 14:25:58 +0000 (+0800) Subject: spi: sun6i: Set bits_per_word_mask to only support 8 bits word length X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=743a46b89a59abcc6566d9d90b1f28bfa666702e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git spi: sun6i: 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 Acked-by: Maxime Ripard Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 4b9ec08022fe..b3e3498a7e6f 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -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;