linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: added documentation for spi chipselects
@ 2010-02-16 18:39 Ernst Schwab
       [not found] ` <20100216193957.ccdffee2.eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Ernst Schwab @ 2010-02-16 18:39 UTC (permalink / raw)
  To: Grant Likely, Kumar Gala,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

From: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>

Added devicetree binding documentation for gpios used as chipselect. The
code to evaluate these is already present in spi_mpc8xxx.c.

Signed-off-by: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
---
diff -upr a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
--- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
@@ -13,6 +13,11 @@ Required properties:
 - interrupt-parent : the phandle for the interrupt controller that
   services interrupts for this device.
 
+Optional properties:
+- gpios : specifies the gpio pins to be used for chipselects. 
+  The gpios will be referred to as reg=<index> in the SPI child nodes.
+  If unspecified, a single SPI device without a chip select can be used.
+
 Example:
 	spi@4c0 {
 		cell-index = <0>;
@@ -21,4 +26,6 @@ Example:
 		interrupts = <82 0>;
 		interrupt-parent = <700>;
 		mode = "cpu";
+		gpios = <&gpio 18 1	// device reg=<0>, low-active
+			 &gpio 19 1>;	// device reg=<1>, low-active
 	};

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

* Re: [PATCH] of: added documentation for spi chipselects
       [not found] ` <20100216193957.ccdffee2.eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
@ 2010-02-16 19:00   ` Grant Likely
  2010-02-16 20:14   ` Wolfram Sang
  1 sibling, 0 replies; 8+ messages in thread
From: Grant Likely @ 2010-02-16 19:00 UTC (permalink / raw)
  To: Ernst Schwab
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Tue, Feb 16, 2010 at 11:39 AM, Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org> wrote:
> From: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
>
> Added devicetree binding documentation for gpios used as chipselect. The
> code to evaluate these is already present in spi_mpc8xxx.c.
>
> Signed-off-by: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>

Merged, thanks.


> ---
> diff -upr a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
> --- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
> +++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
> @@ -13,6 +13,11 @@ Required properties:
>  - interrupt-parent : the phandle for the interrupt controller that
>   services interrupts for this device.
>
> +Optional properties:
> +- gpios : specifies the gpio pins to be used for chipselects.
> +  The gpios will be referred to as reg=<index> in the SPI child nodes.
> +  If unspecified, a single SPI device without a chip select can be used.
> +
>  Example:
>        spi@4c0 {
>                cell-index = <0>;
> @@ -21,4 +26,6 @@ Example:
>                interrupts = <82 0>;
>                interrupt-parent = <700>;
>                mode = "cpu";
> +               gpios = <&gpio 18 1     // device reg=<0>, low-active
> +                        &gpio 19 1>;   // device reg=<1>, low-active
>        };
>
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH] of: added documentation for spi chipselects
       [not found] ` <20100216193957.ccdffee2.eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
  2010-02-16 19:00   ` Grant Likely
@ 2010-02-16 20:14   ` Wolfram Sang
       [not found]     ` <20100216201459.GA17428-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2010-02-16 20:14 UTC (permalink / raw)
  To: Ernst Schwab
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ


[-- Attachment #1.1: Type: text/plain, Size: 1886 bytes --]

On Tue, Feb 16, 2010 at 07:39:57PM +0100, Ernst Schwab wrote:
> From: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
> 
> Added devicetree binding documentation for gpios used as chipselect. The
> code to evaluate these is already present in spi_mpc8xxx.c.
> 
> Signed-off-by: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
> ---
> diff -upr a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
> --- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
> +++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
> @@ -13,6 +13,11 @@ Required properties:
>  - interrupt-parent : the phandle for the interrupt controller that
>    services interrupts for this device.
>  
> +Optional properties:
> +- gpios : specifies the gpio pins to be used for chipselects. 
> +  The gpios will be referred to as reg=<index> in the SPI child nodes.
> +  If unspecified, a single SPI device without a chip select can be used.

Minor: I'd prefer spaces around the '='.

> +
>  Example:
>  	spi@4c0 {
>  		cell-index = <0>;
> @@ -21,4 +26,6 @@ Example:
>  		interrupts = <82 0>;
>  		interrupt-parent = <700>;
>  		mode = "cpu";
> +		gpios = <&gpio 18 1	// device reg=<0>, low-active
> +			 &gpio 19 1>;	// device reg=<1>, low-active

I'd drop the comments. GPIO controllers may have private xlate-functions, so
'1' could theoretically mean something else than "low-active" (although in
practice it hopefully won't).

>  	};
> 
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [PATCH] of: added documentation for spi chipselects
       [not found]     ` <20100216201459.GA17428-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-02-17 12:22       ` Ernst Schwab
  2010-02-17 12:23       ` [PATCH V2] " Ernst Schwab
  1 sibling, 0 replies; 8+ messages in thread
From: Ernst Schwab @ 2010-02-17 12:22 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:

> Minor: I'd prefer spaces around the '='.
Done.

> I'd drop the comments. GPIO controllers may have private xlate-functions, so
> '1' could theoretically mean something else than "low-active" (although in
> practice it hopefully won't).

I dropped the polarity stuff. The "reg =" comment seems important
to me, I had to find this out by grep'ing and looking at the 
SPI master sourcecode. 
Patch V2 will be reposted.

Regards
Ernst

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

* [PATCH V2] of: added documentation for spi chipselects
       [not found]     ` <20100216201459.GA17428-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  2010-02-17 12:22       ` Ernst Schwab
@ 2010-02-17 12:23       ` Ernst Schwab
       [not found]         ` <20100217132322.76cea805.eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Ernst Schwab @ 2010-02-17 12:23 UTC (permalink / raw)
  To: Grant Likely, Kumar Gala,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

From: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>

Added devicetree binding documentation for gpios used as chipselect. The
code to evaluate these is already present in spi_mpc8xxx.c.

Signed-off-by: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
---
diff -upr a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
--- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
@@ -13,6 +13,11 @@ Required properties:
 - interrupt-parent : the phandle for the interrupt controller that
   services interrupts for this device.
 
+Optional properties:
+- gpios : specifies the gpio pins to be used for chipselects. 
+  The gpios will be referred to as reg = <index> in the SPI child nodes.
+  If unspecified, a single SPI device without a chip select can be used.
+
 Example:
 	spi@4c0 {
 		cell-index = <0>;
@@ -21,4 +26,6 @@ Example:
 		interrupts = <82 0>;
 		interrupt-parent = <700>;
 		mode = "cpu";
+		gpios = <&gpio 18 1	// device reg = <0>
+			 &gpio 19 1>;	// device reg = <1>
 	};

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

* Re: [PATCH V2] of: added documentation for spi chipselects
       [not found]         ` <20100217132322.76cea805.eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
@ 2010-02-17 13:41           ` Wolfram Sang
       [not found]             ` <20100217134138.GC26125-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2010-02-17 13:41 UTC (permalink / raw)
  To: Ernst Schwab
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ


[-- Attachment #1.1: Type: text/plain, Size: 1961 bytes --]

On Wed, Feb 17, 2010 at 01:23:22PM +0100, Ernst Schwab wrote:
> From: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
> 
> Added devicetree binding documentation for gpios used as chipselect. The
> code to evaluate these is already present in spi_mpc8xxx.c.
> 
> Signed-off-by: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>

Hmm, as Grant merged the original patch already, it might be necessary to
convert this into a follow-up patch. He will surely tell you. For both
versions, you can add my

Reviewed-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

...

> ---
> diff -upr a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
> --- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
> +++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
> @@ -13,6 +13,11 @@ Required properties:
>  - interrupt-parent : the phandle for the interrupt controller that
>    services interrupts for this device.
>  
> +Optional properties:
> +- gpios : specifies the gpio pins to be used for chipselects. 

...and perhaps remove the trailing white space here.

> +  The gpios will be referred to as reg = <index> in the SPI child nodes.
> +  If unspecified, a single SPI device without a chip select can be used.
> +
>  Example:
>  	spi@4c0 {
>  		cell-index = <0>;
> @@ -21,4 +26,6 @@ Example:
>  		interrupts = <82 0>;
>  		interrupt-parent = <700>;
>  		mode = "cpu";
> +		gpios = <&gpio 18 1	// device reg = <0>
> +			 &gpio 19 1>;	// device reg = <1>
>  	};
> 
> 
> 
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* [PATCH] of: added documentation for spi chipselects, follow-up patch
       [not found]             ` <20100217134138.GC26125-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-02-17 14:15               ` Ernst Schwab
  2010-02-17 14:33               ` [PATCH V2] of: added documentation for spi chipselects Grant Likely
  1 sibling, 0 replies; 8+ messages in thread
From: Ernst Schwab @ 2010-02-17 14:15 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

From: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>

Improved comments and formatting of devicetree binding documentation 
for gpios used as chipselect. 

Signed-off-by: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
Reviewed-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:

> Hmm, as Grant merged the original patch already, it might be necessary to
> convert this into a follow-up patch. He will surely tell you. For both
> versions, you can add my
> 
> Reviewed-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

Ok, I understand - I have to get used to it...

diff -upr a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
--- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
@@ -14,8 +14,8 @@ Required properties:
   services interrupts for this device.
 
 Optional properties:
-- gpios : specifies the gpio pins to be used for chipselects. 
-  The gpios will be referred to as reg=<index> in the SPI child nodes.
+- gpios : specifies the gpio pins to be used for chipselects.
+  The gpios will be referred to as reg = <index> in the SPI child nodes.
   If unspecified, a single SPI device without a chip select can be used.
 
 Example:
@@ -26,6 +26,6 @@ Example:
 		interrupts = <82 0>;
 		interrupt-parent = <700>;
 		mode = "cpu";
-		gpios = <&gpio 18 1	// device reg=<0>, low-active
-			 &gpio 19 1>;	// device reg=<1>, low-active
+		gpios = <&gpio 18 1	// device reg = <0>
+			 &gpio 19 1>;	// device reg = <1>
 	};

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

* Re: [PATCH V2] of: added documentation for spi chipselects
       [not found]             ` <20100217134138.GC26125-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  2010-02-17 14:15               ` [PATCH] of: added documentation for spi chipselects, follow-up patch Ernst Schwab
@ 2010-02-17 14:33               ` Grant Likely
  1 sibling, 0 replies; 8+ messages in thread
From: Grant Likely @ 2010-02-17 14:33 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Wed, Feb 17, 2010 at 6:41 AM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:
> On Wed, Feb 17, 2010 at 01:23:22PM +0100, Ernst Schwab wrote:
>> From: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
>>
>> Added devicetree binding documentation for gpios used as chipselect. The
>> code to evaluate these is already present in spi_mpc8xxx.c.
>>
>> Signed-off-by: Ernst Schwab <eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
>
> Hmm, as Grant merged the original patch already, it might be necessary to
> convert this into a follow-up patch. He will surely tell you. For both
> versions, you can add my
>
> Reviewed-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

I'll just patch up the one in my tree.  Don't worry about it.

g.

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

end of thread, other threads:[~2010-02-17 14:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16 18:39 [PATCH] of: added documentation for spi chipselects Ernst Schwab
     [not found] ` <20100216193957.ccdffee2.eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
2010-02-16 19:00   ` Grant Likely
2010-02-16 20:14   ` Wolfram Sang
     [not found]     ` <20100216201459.GA17428-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-02-17 12:22       ` Ernst Schwab
2010-02-17 12:23       ` [PATCH V2] " Ernst Schwab
     [not found]         ` <20100217132322.76cea805.eschwab-BGeptl67XyCzQB+pC5nmwQ@public.gmane.org>
2010-02-17 13:41           ` Wolfram Sang
     [not found]             ` <20100217134138.GC26125-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-02-17 14:15               ` [PATCH] of: added documentation for spi chipselects, follow-up patch Ernst Schwab
2010-02-17 14:33               ` [PATCH V2] of: added documentation for spi chipselects Grant Likely

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).