diff mbox

[2/3] spi: armada-3700: Set mode bits correctly

Message ID 20161216093325.GA13942@elgon.mountain (mailing list archive)
State Accepted
Commit 42cd4ed888393b2bc8ddfd277aa2d0ec0c7e0259
Headers show

Commit Message

Dan Carpenter Dec. 16, 2016, 9:33 a.m. UTC
We set SPI_RX_DUAL twice instead of setting SPI_TX_DUAL.

Fixes: 5762ab71eb24 ("spi: Add support for Armada 3700 SPI Controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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

Comments

Romain Perier Dec. 16, 2016, 10:30 a.m. UTC | #1
Hello,

Le 16/12/2016 à 10:33, Dan Carpenter a écrit :
> We set SPI_RX_DUAL twice instead of setting SPI_TX_DUAL.
>
> Fixes: 5762ab71eb24 ("spi: Add support for Armada 3700 SPI Controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
> index 5c7508dc6f0b..40491be3365f 100644
> --- a/drivers/spi/spi-armada-3700.c
> +++ b/drivers/spi/spi-armada-3700.c
> @@ -825,7 +825,7 @@ static int a3700_spi_probe(struct platform_device *pdev)
>  	master->unprepare_message = a3700_spi_unprepare_message;
>  	master->set_cs = a3700_spi_set_cs;
>  	master->flags = SPI_MASTER_HALF_DUPLEX;
> -	master->mode_bits |= (SPI_RX_DUAL | SPI_RX_DUAL |
> +	master->mode_bits |= (SPI_RX_DUAL | SPI_TX_DUAL |
>  			      SPI_RX_QUAD | SPI_TX_QUAD);
>
>  	platform_set_drvdata(pdev, master);
>

Good catch,

Acked-by: Romain Perier <romain.perier@free-electrons.com>


Thanks,
Romain
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
index 5c7508dc6f0b..40491be3365f 100644
--- a/drivers/spi/spi-armada-3700.c
+++ b/drivers/spi/spi-armada-3700.c
@@ -825,7 +825,7 @@  static int a3700_spi_probe(struct platform_device *pdev)
 	master->unprepare_message = a3700_spi_unprepare_message;
 	master->set_cs = a3700_spi_set_cs;
 	master->flags = SPI_MASTER_HALF_DUPLEX;
-	master->mode_bits |= (SPI_RX_DUAL | SPI_RX_DUAL |
+	master->mode_bits |= (SPI_RX_DUAL | SPI_TX_DUAL |
 			      SPI_RX_QUAD | SPI_TX_QUAD);
 
 	platform_set_drvdata(pdev, master);