linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] spi: sun4i: Set bits_per_word_mask to only support 8 bits word length
@ 2014-03-02 14:25 Axel Lin
  2014-03-02 14:25 ` [PATCH 2/2] spi: sun6i: " Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Axel Lin @ 2014-03-02 14:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: Maxime Ripard, linux-spi-u79uwXL29TY76Z2rM5mHXA

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-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/spi/spi-sun4i.c | 1 +
 1 file changed, 1 insertion(+)

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;
 
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-04  3:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02 14:25 [PATCH 1/2] spi: sun4i: Set bits_per_word_mask to only support 8 bits word length Axel Lin
2014-03-02 14:25 ` [PATCH 2/2] spi: sun6i: " Axel Lin
2014-03-03 13:56   ` Maxime Ripard
2014-03-03 13:55 ` [PATCH 1/2] spi: sun4i: " Maxime Ripard
2014-03-04  3:08 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).