diff mbox

[4/6] spi: davinci: set new SPI_FC_* flags

Message ID 1456843400-20696-4-git-send-email-linux@rempel-privat.de (mailing list archive)
State New, archived
Headers show

Commit Message

Oleksij Rempel March 1, 2016, 2:43 p.m. UTC
to indicate flow control support.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/spi/spi-davinci.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Mark Brown March 2, 2016, 2:16 a.m. UTC | #1
On Tue, Mar 01, 2016 at 03:43:18PM +0100, Oleksij Rempel wrote:

> -		if (spi->mode & SPI_READY) {
> +		if (spi->mode & SPI_FC_READY) {

This isn't setting new flags, this is replacing old flags with new ones
which suggests that the patch renaming the flag needs to rename the flag
in all the drivers...
Mark Brown March 2, 2016, 10:48 a.m. UTC | #2
On Wed, Mar 02, 2016 at 07:25:24AM +0100, fixed-term.Oleksij.Rempel wrote:
> On 02.03.2016 03:16, Mark Brown wrote:
> > On Tue, Mar 01, 2016 at 03:43:18PM +0100, Oleksij Rempel wrote:

> >> -		if (spi->mode & SPI_READY) { +		if (spi->mode & SPI_FC_READY)
> >> {

> > This isn't setting new flags, this is replacing old flags with new
> > ones which suggests that the patch renaming the flag needs to
> > rename the flag in all the drivers...

> Only this driver was using this flag SPI_READY. So i assume, i will
> need only to reword patch comment. Right?

No, if this is a rename you need to do it as a rename.
diff mbox

Patch

diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
index fddb7a3..8728df9 100644
--- a/drivers/spi/spi-davinci.c
+++ b/drivers/spi/spi-davinci.c
@@ -351,8 +351,8 @@  static int davinci_spi_setup_transfer(struct spi_device *spi,
 	 *
 	 * Version 2 hardware supports an optional handshaking signal,
 	 * so it can support two more modes:
-	 *  - 5 pin SPI variant is standard SPI plus SPI_READY
-	 *  - 4 pin with enable is (SPI_READY | SPI_NO_CS)
+	 *  - 5 pin SPI variant is standard SPI plus SPI_FC_READY
+	 *  - 4 pin with enable is (SPI_FC_READY | SPI_NO_CS)
 	 */
 
 	if (dspi->version == SPI_VERSION_2) {
@@ -374,7 +374,7 @@  static int davinci_spi_setup_transfer(struct spi_device *spi,
 						& SPIDELAY_T2CDELAY_MASK;
 		}
 
-		if (spi->mode & SPI_READY) {
+		if (spi->mode & SPI_FC_READY) {
 			spifmt |= SPIFMT_WAITENA_MASK;
 			delay |= (spicfg->t2edelay << SPIDELAY_T2EDELAY_SHIFT)
 						& SPIDELAY_T2EDELAY_MASK;
@@ -452,7 +452,7 @@  static int davinci_spi_setup(struct spi_device *spi)
 			set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
 	}
 
-	if (spi->mode & SPI_READY)
+	if (spi->mode & SPI_FC_READY)
 		set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK);
 
 	if (spi->mode & SPI_LOOP)
@@ -1021,7 +1021,7 @@  static int davinci_spi_probe(struct platform_device *pdev)
 
 	dspi->bitbang.flags = SPI_NO_CS | SPI_LSB_FIRST | SPI_LOOP;
 	if (dspi->version == SPI_VERSION_2)
-		dspi->bitbang.flags |= SPI_READY;
+		dspi->bitbang.flags |= SPI_FC_HW_ONLY | SPI_FC_READY | SPI_FC_PAUSE;
 
 	if (pdev->dev.of_node) {
 		int i;