Linux-SPI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v3 0/2] spi: dt-bindings: spi-controller: Slave mode fixes
@ 2020-03-06  8:50 Geert Uytterhoeven
  2020-03-06  8:50 ` [PATCH v3 1/2] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-03-06  8:50 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Maxime Ripard
  Cc: Yoshihiro Shimoda, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

	Hi Mark, Rob, Maxime,

This patch series contains two fixes for the SPI controller DT bindings
regarding SPI controllers configured for slave mode.

Changes compared to v2[1]:
  - Make #address-cells mutually-exclusive with spi-slave,

Changes compared to v1[2]:
  - Use "enum: [0, 1]" instead of min/max limit,
  - use "- spi-slave" instead of "[ spi-slave ]".
  - New fix for spi-[rt]x-bus-width.

Thanks!

[1] https://lore.kernel.org/linux-devicetree/20200303094522.23180-1-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org/
[2] https://lore.kernel.org/linux-devicetree/20200227130323.15327-1-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org/

Geert Uytterhoeven (2):
  spi: dt-bindings: spi-controller: Fix #address-cells for slave mode
  spi: dt-bindings: spi-controller: Fix spi-[rt]x-bus-width for slave
    mode

 .../devicetree/bindings/spi/spi-controller.yaml        | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-- 
2.17.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/2] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode
  2020-03-06  8:50 [PATCH v3 0/2] spi: dt-bindings: spi-controller: Slave mode fixes Geert Uytterhoeven
@ 2020-03-06  8:50 ` Geert Uytterhoeven
       [not found]   ` <20200306085038.8111-2-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
  2020-03-13 17:06   ` Applied "spi: dt-bindings: spi-controller: Fix #address-cells for slave mode" to the spi tree Mark Brown
       [not found] ` <20200306085038.8111-1-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
  2020-03-13 17:20 ` Patchwork summary for: spi-devel-general patchwork-bot+linux-spi-DgEjT+Ai2ygdnm+yROfE0A
  2 siblings, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-03-06  8:50 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Maxime Ripard
  Cc: Yoshihiro Shimoda, linux-spi, devicetree, linux-renesas-soc,
	Geert Uytterhoeven

Currently, the DT bindings for an SPI controller specify that
"#address-cells" must be fixed to one.  However, that applies to an SPI
controller in master mode only.  When running in SPI slave mode,
"#address-cells" should not be specified.

Fix this making "#address-cells" mutually-exclusive with "spi-slave".

Fixes: 0a1b929356830257 ("spi: Add YAML schemas for the generic SPI options")
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Make #address-cells mutually-exclusive with spi-slave,

v2:
  - Use "enum: [0, 1]" instead of min/max limit,
  - use "- spi-slave" instead of "[ spi-slave ]".
---
 Documentation/devicetree/bindings/spi/spi-controller.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 1e0ca6ccf64bbd0a..0ebaf6677ac4f68d 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -52,6 +52,12 @@ properties:
     description:
       The SPI controller acts as a slave, instead of a master.
 
+oneOf:
+  - required:
+      - "#address-cells"
+  - required:
+      - spi-slave
+
 patternProperties:
   "^slave$":
     type: object
-- 
2.17.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 2/2] spi: dt-bindings: spi-controller: Fix spi-[rt]x-bus-width for slave mode
       [not found] ` <20200306085038.8111-1-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2020-03-06  8:50   ` Geert Uytterhoeven
       [not found]     ` <20200306085038.8111-3-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-03-06  8:50 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Maxime Ripard
  Cc: Yoshihiro Shimoda, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

The descriptions for the spi-rx-bus-width and spi-tx-bus-width
properties refer to "MISO" and "MOSI", which are not explained in the
document.  While these abbreviations are fairly common when talking
about SPI, and thus may not need an explanation, they are not entirely
correct in this context, as the SPI controller may be used in slave mode
instead of master mode.

Fix this by replacing them by "read transfers" resp. "write transfers",
like is done for the spi-rx-delay-us and spi-tx-delay-us properties.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v3:
  - No changes,

v2:
  - New.

This issue was present in the .txt version of the bindings, too, so
technically it needs
Fixes: a8830cb19cfea04e ("spi: Document DT bindings for SPI controllers in slave mode")
but of course it won't apply to that version.
---
 Documentation/devicetree/bindings/spi/spi-controller.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 0ebaf6677ac4f68d..d8e5509a70816df5 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -120,7 +120,7 @@ patternProperties:
           - enum: [ 1, 2, 4, 8 ]
           - default: 1
         description:
-          Bus width to the SPI bus used for MISO.
+          Bus width to the SPI bus used for read transfers.
 
       spi-rx-delay-us:
         description:
@@ -132,7 +132,7 @@ patternProperties:
           - enum: [ 1, 2, 4, 8 ]
           - default: 1
         description:
-          Bus width to the SPI bus used for MOSI.
+          Bus width to the SPI bus used for write transfers.
 
       spi-tx-delay-us:
         description:
-- 
2.17.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode
       [not found]   ` <20200306085038.8111-2-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2020-03-12 19:16     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-03-12 19:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mark Brown, Yoshihiro Shimoda, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Fri,  6 Mar 2020 09:50:37 +0100, Geert Uytterhoeven wrote:
> Currently, the DT bindings for an SPI controller specify that
> "#address-cells" must be fixed to one.  However, that applies to an SPI
> controller in master mode only.  When running in SPI slave mode,
> "#address-cells" should not be specified.
> 
> Fix this making "#address-cells" mutually-exclusive with "spi-slave".
> 
> Fixes: 0a1b929356830257 ("spi: Add YAML schemas for the generic SPI options")
> Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> ---
> v3:
>   - Make #address-cells mutually-exclusive with spi-slave,
> 
> v2:
>   - Use "enum: [0, 1]" instead of min/max limit,
>   - use "- spi-slave" instead of "[ spi-slave ]".
> ---
>  Documentation/devicetree/bindings/spi/spi-controller.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/2] spi: dt-bindings: spi-controller: Fix spi-[rt]x-bus-width for slave mode
       [not found]     ` <20200306085038.8111-3-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2020-03-12 19:17       ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-03-12 19:17 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mark Brown, Yoshihiro Shimoda, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On Fri,  6 Mar 2020 09:50:38 +0100, Geert Uytterhoeven wrote:
> The descriptions for the spi-rx-bus-width and spi-tx-bus-width
> properties refer to "MISO" and "MOSI", which are not explained in the
> document.  While these abbreviations are fairly common when talking
> about SPI, and thus may not need an explanation, they are not entirely
> correct in this context, as the SPI controller may be used in slave mode
> instead of master mode.
> 
> Fix this by replacing them by "read transfers" resp. "write transfers",
> like is done for the spi-rx-delay-us and spi-tx-delay-us properties.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> ---
> v3:
>   - No changes,
> 
> v2:
>   - New.
> 
> This issue was present in the .txt version of the bindings, too, so
> technically it needs
> Fixes: a8830cb19cfea04e ("spi: Document DT bindings for SPI controllers in slave mode")
> but of course it won't apply to that version.
> ---
>  Documentation/devicetree/bindings/spi/spi-controller.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Applied "spi: dt-bindings: spi-controller: Fix #address-cells for slave mode" to the spi tree
  2020-03-06  8:50 ` [PATCH v3 1/2] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode Geert Uytterhoeven
       [not found]   ` <20200306085038.8111-2-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2020-03-13 17:06   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-03-13 17:06 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: devicetree, linux-renesas-soc, linux-spi, Mark Brown,
	Maxime Ripard, Rob Herring, Yoshihiro Shimoda

The patch

   spi: dt-bindings: spi-controller: Fix #address-cells for slave mode

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From a079ff858cc0831f5bbad205016bfd88bf992bb1 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Fri, 6 Mar 2020 09:50:37 +0100
Subject: [PATCH] spi: dt-bindings: spi-controller: Fix #address-cells for
 slave mode

Currently, the DT bindings for an SPI controller specify that
"#address-cells" must be fixed to one.  However, that applies to an SPI
controller in master mode only.  When running in SPI slave mode,
"#address-cells" should not be specified.

Fix this making "#address-cells" mutually-exclusive with "spi-slave".

Fixes: 0a1b929356830257 ("spi: Add YAML schemas for the generic SPI options")
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200306085038.8111-2-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/spi/spi-controller.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 1e0ca6ccf64b..0ebaf6677ac4 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -52,6 +52,12 @@ properties:
     description:
       The SPI controller acts as a slave, instead of a master.
 
+oneOf:
+  - required:
+      - "#address-cells"
+  - required:
+      - spi-slave
+
 patternProperties:
   "^slave$":
     type: object
-- 
2.20.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Patchwork summary for: spi-devel-general
  2020-03-06  8:50 [PATCH v3 0/2] spi: dt-bindings: spi-controller: Slave mode fixes Geert Uytterhoeven
  2020-03-06  8:50 ` [PATCH v3 1/2] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode Geert Uytterhoeven
       [not found] ` <20200306085038.8111-1-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2020-03-13 17:20 ` patchwork-bot+linux-spi-DgEjT+Ai2ygdnm+yROfE0A
  2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+linux-spi-DgEjT+Ai2ygdnm+yROfE0A @ 2020-03-13 17:20 UTC (permalink / raw)
  To: linux-spi-u79uwXL29TY76Z2rM5mHXA, broonie-DgEjT+Ai2ygdnm+yROfE0A

Hello:

The following patches were marked "accepted", because they were applied to
broonie/spi.git (refs/heads/for-next):

Series: spi: dt-bindings: spi-controller: Slave mode fixes
  Submitter: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
  Patchwork: https://patchwork.kernel.org/project/spi-devel-general/list/?series=252285
    Patches: [v3,1/2] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode
             [v3,2/2] spi: dt-bindings: spi-controller: Fix spi-[rt]x-bus-width for slave mode

Total patches: 2

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06  8:50 [PATCH v3 0/2] spi: dt-bindings: spi-controller: Slave mode fixes Geert Uytterhoeven
2020-03-06  8:50 ` [PATCH v3 1/2] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode Geert Uytterhoeven
     [not found]   ` <20200306085038.8111-2-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2020-03-12 19:16     ` Rob Herring
2020-03-13 17:06   ` Applied "spi: dt-bindings: spi-controller: Fix #address-cells for slave mode" to the spi tree Mark Brown
     [not found] ` <20200306085038.8111-1-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2020-03-06  8:50   ` [PATCH v3 2/2] spi: dt-bindings: spi-controller: Fix spi-[rt]x-bus-width for slave mode Geert Uytterhoeven
     [not found]     ` <20200306085038.8111-3-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2020-03-12 19:17       ` Rob Herring
2020-03-13 17:20 ` Patchwork summary for: spi-devel-general patchwork-bot+linux-spi-DgEjT+Ai2ygdnm+yROfE0A

Linux-SPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-spi/0 linux-spi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spi linux-spi/ https://lore.kernel.org/linux-spi \
		linux-spi@vger.kernel.org
	public-inbox-index linux-spi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-spi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git