Skip to contentSkip to conversation

spi: nuc900: Set SPI_LSB_FIRST for master->mode_bits if hw->pdata->lsb is true

PATCH Applied Axel Lin 2 participants 2 messages Jan 20, 2014 – Jan 27, 2014 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: nuc900: Set SPI_LSB_FIRST for master->mode_bits if hw->pdata->lsb is true

Otherwise, spi_setup() fails with unsupported mode bits message.

---
 drivers/spi/spi-nuc900.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/spi/spi-nuc900.c +2 -0
index 5040630..bae97ff 100644
@@ -361,6 +361,8 @@ static int nuc900_spi_probe(struct platform_device *pdev)
 	init_completion(&hw->done);
 
 	master->mode_bits          = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
+	if (hw->pdata->lsb)
+		master->mode_bits |= SPI_LSB_FIRST;
 	master->num_chipselect     = hw->pdata->num_cs;
 	master->bus_num            = hw->pdata->bus_num;
 	hw->bitbang.master         = hw->master;
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
Applied
#1 lore raw
Quoted 1 line · Axel Lin

Otherwise, spi_setup() fails with unsupported mode bits message.

Applied, thanks.