Skip to contentSkip to conversation

spi: sun4i: Set bits_per_word_mask to only support 8 bits word length

PATCH Applied Axel Lin 3 participants 5 messages Mar 2, 2014 – Mar 4, 2014

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 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.

---
 drivers/spi/spi-sun4i.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-sun4i.c +1 -0
index 3f82705..d266a87 100644
@@ -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;
 
Signature · 8 lines
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#1 lore raw

PATCH 2/2 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.

---
 drivers/spi/spi-sun6i.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-sun6i.c +1 -0
index 4b9ec08..b3e3498 100644
@@ -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;
 
Signature · 8 lines
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] spi: sun6i: Set bits_per_word_mask to only support 8 bits word length

Quoted 5 lines · Axel Lin

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.

Thanks!
Maxime

Signature · 3 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Acked-by on v1 1/2
#3 lore raw
In reply to Axel Lin
Quoted 5 lines · Axel Lin

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.

Thanks!
Maxime

Signature · 3 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Applied
#4 lore raw
In reply to Axel Lin
Quoted 3 lines · Axel Lin

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.