login
Header Space

 
 

Re: [PATCH 3/4] spi: Add OF binding support for SPI busses

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Guennadi Liakhovetski <g.liakhovetski@...>
Cc: <linux-kernel@...>, <spi-devel-general@...>, <dbrownell@...>, <linuxppc-dev@...>, <fabrizio.garetto@...>, Grant Likely <grant.likely@...>
Date: Wednesday, May 21, 2008 - 3:11 pm

> Ok, elegance apart:-) You can use the SPI-bridge construct to also

It would be best to handle all these things that are specific to
a certain SPI controller (like how CSs work) in the binding for
that SPI controller, and not try to shoehorn all of this into some
artificial generic framework.

If you can have identical addresses on the SPI bus going to different
devices based on which CS is asserted, you'll have to make the CS part
of the "reg".  Example:

spi-controller {
	#address-cells = 2;
	#size-cells = 0;
	some-device@0,f000 { reg = < 0 f000 >; } // CS 0, SPI address f000
	some-device@1,f000 { reg = < 1 f000 >; } // CS 1, SPI address f000
	some-device@1,ff00 { reg = < 1 ff00 >; } // CS 1, SPI address ff00
}

SPI-to-SPI bridges can (and should!) be handled the same way as
anything-to-anything-else bridges are handled as well: either there
is a nice simple one-to-one matching (and you can use "ranges") or
you need a driver for that bridge that knows how to make it work (or
both, "ranges" isn't always enough, the bridge might require some
specific handling for some special situations -- error handling,
suspend, whatever).


Segher

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/4] spi: Add OF binding support for SPI busses, Grant Likely, (Fri May 16, 3:36 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Guennadi Liakhovetski, (Mon May 19, 9:17 am)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Guennadi Liakhovetski, (Mon May 19, 12:30 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Guennadi Liakhovetski, (Tue May 20, 11:26 am)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Segher Boessenkool, (Wed May 21, 3:11 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Gary Jennejohn, (Mon May 19, 1:09 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Mon May 19, 1:19 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Wed May 21, 11:19 am)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Thu May 22, 10:05 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Sat May 24, 1:43 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Jochen Friedrich, (Sat May 24, 1:14 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Sat May 24, 1:45 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Fri May 16, 6:03 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Fri May 16, 6:49 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Wed May 21, 9:16 pm)
speck-geostationary