* [PATCH 1/4] spi: rspi: List full example compatible properties in bindings
@ 2014-02-21 16:29 Geert Uytterhoeven
[not found] ` <1393000158-6622-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-02-21 16:29 UTC (permalink / raw)
To: Mark Brown
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
devicetree-u79uwXL29TY76Z2rM5mHXA
From: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
List full example compatible properties with soctypes instead of just the
soctypes, so checkpatch can validate DTSes.
Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
Documentation/devicetree/bindings/spi/spi-rspi.txt | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-rspi.txt b/Documentation/devicetree/bindings/spi/spi-rspi.txt
index 95f9b21d239f..e54924b2aff6 100644
--- a/Documentation/devicetree/bindings/spi/spi-rspi.txt
+++ b/Documentation/devicetree/bindings/spi/spi-rspi.txt
@@ -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.
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] spi: rspi: Remove bogus colon in formatting
[not found] ` <1393000158-6622-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-02-21 16:29 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-02-21 16:29 UTC (permalink / raw)
To: Mark Brown
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
devicetree-u79uwXL29TY76Z2rM5mHXA
From: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
Documentation/devicetree/bindings/spi/spi-rspi.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-rspi.txt b/Documentation/devicetree/bindings/spi/spi-rspi.txt
index e54924b2aff6..d57d82a74054 100644
--- a/Documentation/devicetree/bindings/spi/spi-rspi.txt
+++ b/Documentation/devicetree/bindings/spi/spi-rspi.txt
@@ -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,*.
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] spi: rspi: Remove empty rspi_cleanup()
2014-02-21 16:29 [PATCH 1/4] spi: rspi: List full example compatible properties in bindings Geert Uytterhoeven
[not found] ` <1393000158-6622-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-02-21 16:29 ` Geert Uytterhoeven
2014-02-21 16:29 ` [PATCH 4/4] spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers Geert Uytterhoeven
2014-02-23 3:27 ` [PATCH 1/4] spi: rspi: List full example compatible properties in bindings Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-02-21 16:29 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-sh, linux-kernel, Geert Uytterhoeven
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
If spi_master.cleanup() is not needed, it can be left unimplemented.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
drivers/spi/spi-rspi.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 04528888a53f..4a1f978c3381 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers
2014-02-21 16:29 [PATCH 1/4] spi: rspi: List full example compatible properties in bindings Geert Uytterhoeven
[not found] ` <1393000158-6622-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-02-21 16:29 ` [PATCH 3/4] spi: rspi: Remove empty rspi_cleanup() Geert Uytterhoeven
@ 2014-02-21 16:29 ` Geert Uytterhoeven
2014-02-23 3:27 ` [PATCH 1/4] spi: rspi: List full example compatible properties in bindings Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-02-21 16:29 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-sh, linux-kernel, Geert Uytterhoeven
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
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.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
drivers/spi/spi-rspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 4a1f978c3381..92bec7e91046 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -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) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] spi: rspi: List full example compatible properties in bindings
2014-02-21 16:29 [PATCH 1/4] spi: rspi: List full example compatible properties in bindings Geert Uytterhoeven
` (2 preceding siblings ...)
2014-02-21 16:29 ` [PATCH 4/4] spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers Geert Uytterhoeven
@ 2014-02-23 3:27 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-02-23 3:27 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-spi, linux-sh, linux-kernel, Geert Uytterhoeven, devicetree
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
On Fri, Feb 21, 2014 at 05:29:15PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
>
> List full example compatible properties with soctypes instead of just the
> soctypes, so checkpatch can validate DTSes.
Applied all, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-23 3:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 16:29 [PATCH 1/4] spi: rspi: List full example compatible properties in bindings Geert Uytterhoeven
[not found] ` <1393000158-6622-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-02-21 16:29 ` [PATCH 2/4] spi: rspi: Remove bogus colon in formatting Geert Uytterhoeven
2014-02-21 16:29 ` [PATCH 3/4] spi: rspi: Remove empty rspi_cleanup() Geert Uytterhoeven
2014-02-21 16:29 ` [PATCH 4/4] spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers Geert Uytterhoeven
2014-02-23 3:27 ` [PATCH 1/4] spi: rspi: List full example compatible properties in bindings Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).