spi: rspi: List full example compatible properties in bindings
Subsystems (3)
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
@@ -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
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
@@ -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
PATCH 3/4 spi: rspi: Remove empty rspi_cleanup()
In reply to Geert UytterhoevenFrom: 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
@@ -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
PATCH 4/4 spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers
In reply to Geert UytterhoevenFrom: 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
@@ -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
Quoted 4 lines · Geert Uytterhoeven
From: Geert Uytterhoeven <[email protected]>
List full example compatible properties with soctypes instead of just the soctypes, so checkpatch can validate DTSes.
Applied all, thanks.