Thread (9 messages) flat view 9 messages, 4 authors, 2008-12-16

Re: [RFC] Dummy GPIO driver for use with SPI

From: David Gibson <hidden>
Date: 2008-12-12 22:46:15

On Fri, Dec 12, 2008 at 01:39:45PM -0800, Trent Piepho wrote:
On Fri, 12 Dec 2008, Anton Vorontsov wrote:
quoted
On Fri, Dec 12, 2008 at 11:59:13AM -0500, Steven A. Falco wrote:
quoted
What do you think about having a mechanism to specify that some
SPI slaves have a chip select, while others don't have to have a
chip select managed by the SPI subsystem?
Um.. do you know that you can pass '0' as a GPIO?

For example,

spi-controller {
	gpios = <&pio1 1 0	/* cs0 */
		 0		/* cs1, no GPIO */
		 &pio2 2 0>;	/* cs2 */
It's ok the that middle specifier is only one word instead of three?  Seems
like "0 0 0" would be better, so all the specifiers are the same
size.
No.  The gpio specifier size is already a property of the gpio
controller, so the phandle must be understood before reading the
specifier cells (interrupt specifiers are variable size in the same
way).  It's just that nearly every (real) gpio controller has a 2 cell
specifier.  Having the "null" gpio have #gpio-cells non-zero would be
silly, though.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help