All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: altera: Use bits_per_word_mask
@ 2014-03-05  5:37 Axel Lin
  2014-03-13  9:55 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-03-05  5:37 UTC (permalink / raw)
  To: Mark Brown; +Cc: Thomas Chou, linux-spi-u79uwXL29TY76Z2rM5mHXA

This driver does not work for bits_per_word greater than 16.
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-altera.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index 1928b83..f83f626 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -213,6 +213,7 @@ static int altera_spi_probe(struct platform_device *pdev)
 	master->bus_num = pdev->id;
 	master->num_chipselect = 16;
 	master->mode_bits = SPI_CS_HIGH;
+	master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 16);
 
 	hw = spi_master_get_devdata(master);
 	platform_set_drvdata(pdev, hw);
-- 
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] 2+ messages in thread

* Re: [PATCH] spi: altera: Use bits_per_word_mask
  2014-03-05  5:37 [PATCH] spi: altera: Use bits_per_word_mask Axel Lin
@ 2014-03-13  9:55 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-03-13  9:55 UTC (permalink / raw)
  To: Axel Lin; +Cc: Thomas Chou, linux-spi-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

On Wed, Mar 05, 2014 at 01:37:00PM +0800, Axel Lin wrote:
> This driver does not work for bits_per_word greater than 16.
> Set bits_per_word_mask so spi core will reject transfers that attempt to use
> an unsupported bits_per_word value.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2014-03-13  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05  5:37 [PATCH] spi: altera: Use bits_per_word_mask Axel Lin
2014-03-13  9:55 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.