diff mbox

[1/2] spi: sun4i: Set bits_per_word_mask to only support 8 bits word length

Message ID 1393770310.4044.0.camel@phoenix (mailing list archive)
State Accepted
Commit ba47644d5b79914fe53b69c639902afce8ccfe7f
Headers show

Commit Message

Axel Lin March 2, 2014, 2:25 p.m. UTC
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>
---
 drivers/spi/spi-sun4i.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxime Ripard March 3, 2014, 1:55 p.m. UTC | #1
On Sun, Mar 02, 2014 at 10:25:10PM +0800, Axel Lin wrote:
> 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>

Thanks!
Maxime
Mark Brown March 4, 2014, 3:08 a.m. UTC | #2
On Sun, Mar 02, 2014 at 10:25:10PM +0800, Axel Lin wrote:
> 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.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index 3f82705..d266a87 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)
 	master->transfer_one = sun4i_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;