Skip to contentSkip to conversation

spi: rspi: List full example compatible properties in bindings

PATCH Applied Geert Uytterhoeven 2 participants 5 messages Feb 21, 2014 – Feb 23, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 spi: rspi: List full example compatible properties in bindings

From: Geert Uytterhoeven <[email protected]>

List full example compatible properties with soctypes instead of just the soctypes, so checkpatch can validate DTSes.

---
 Documentation/devicetree/bindings/spi/spi-rspi.txt |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/spi/spi-rspi.txt +5 -3
index 95f9b21d239f..e54924b2aff6 100644
@@ -7,9 +7,11 @@ Required properties:
 		     "renesas,rspi-<soctype>", "renesas,rspi-rz" as fallback.
 		     For Quad Serial Peripheral Interface on R-Car Gen2:
 		     "renesas,qspi-<soctype>", "renesas,qspi" as fallback.
-		     Examples of valid soctypes are "sh7757" (SH),
-		     "r7s72100" (RZ/A1H), "r8a7790" (R-Car H2), and
-		     "r8a7791" (R-Car M2).
+		     Examples with soctypes are:
+		        - "renesas,rspi-sh7757" (SH)
+			- "renesas,rspi-r7s72100" (RZ/A1H)
+			- "renesas,qspi-r8a7790" (R-Car H2)
+			- "renesas,qspi-r8a7791" (R-Car M2)
 - reg              : Address start and address range size of the device
 - interrupts       : A list of interrupt-specifiers, one for each entry in
 		     interrupt-names.
Signature · 6 lines
1.7.9.5

--
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
#1 lore raw

PATCH 2/4 spi: rspi: Remove bogus colon in formatting

From: Geert Uytterhoeven <[email protected]>

---
 Documentation/devicetree/bindings/spi/spi-rspi.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/spi-rspi.txt +1 -1
index e54924b2aff6..d57d82a74054 100644
@@ -29,7 +29,7 @@ Required properties:
 - #size-cells      : Must be <0>
 
 Optional properties:
-- clocks:           : Must contain a reference to the functional clock.
+- clocks           : Must contain a reference to the functional clock.
 
 Pinctrl properties might be needed, too.  See
 Documentation/devicetree/bindings/pinctrl/renesas,*.
Signature · 6 lines
1.7.9.5

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

PATCH 3/4 spi: rspi: Remove empty rspi_cleanup()

In reply to Geert Uytterhoeven

From: Geert Uytterhoeven <[email protected]>

If spi_master.cleanup() is not needed, it can be left unimplemented.

---
 drivers/spi/spi-rspi.c |    5 -----
 1 file changed, 5 deletions(-)
drivers/spi/spi-rspi.c +0 -5
index 04528888a53f..4a1f978c3381 100644
@@ -893,10 +893,6 @@ static int rspi_setup(struct spi_device *spi)
 	return 0;
 }
 
-static void rspi_cleanup(struct spi_device *spi)
-{
-}
-
 static u16 qspi_transfer_mode(const struct spi_transfer *xfer)
 {
 	if (xfer->tx_buf)
@@ -1255,7 +1251,6 @@ static int rspi_probe(struct platform_device *pdev)
 	master->bus_num = pdev->id;
 	master->setup = rspi_setup;
 	master->transfer_one = ops->transfer_one;
-	master->cleanup = rspi_cleanup;
 	master->prepare_message = rspi_prepare_message;
 	master->unprepare_message = rspi_unprepare_message;
 	master->mode_bits = ops->mode_bits;
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 4/4 spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers

In reply to Geert Uytterhoeven

From: Geert Uytterhoeven <[email protected]>

While normal Dual and Quad SPI Transfers are unidirectional, we must do a bidirectional transfer if loopback mode is enabled, else rx_buf is not filled.

With spidev it seemed to work, as spidev uses the same buffer for tranmission and reception.

---
 drivers/spi/spi-rspi.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-rspi.c +3 -1
index 4a1f978c3381..92bec7e91046 100644
@@ -859,7 +859,9 @@ static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
 {
 	struct rspi_data *rspi = spi_master_get_devdata(master);
 
-	if (xfer->tx_buf && xfer->tx_nbits > SPI_NBITS_SINGLE) {
+	if (spi->mode & SPI_LOOP) {
+		return qspi_transfer_out_in(rspi, xfer);
+	} else if (xfer->tx_buf && xfer->tx_nbits > SPI_NBITS_SINGLE) {
 		/* Quad or Dual SPI Write */
 		return qspi_transfer_out(rspi, xfer);
 	} else if (xfer->rx_buf && xfer->rx_nbits > SPI_NBITS_SINGLE) {
Signature · 1 line
1.7.9.5