linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] AT91: SPI: Add peripheral chip select decoding
@ 2011-05-31 16:04 Christian Gagneraud
  2011-05-31 16:04 ` [PATCH RFC 1/3] AT91: SPI: Add CS decode support Christian Gagneraud
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christian Gagneraud @ 2011-05-31 16:04 UTC (permalink / raw)
  To: linux-arm-kernel

This is a RFC on adding support for CS decode on AT91 platforms.
CS decode allow to control many SPI devices with few CS lines by simply coding
the CS# on the lines, that is with 4 CS lines you can adress up to 15 SPI 
devices. Of course this require a decoder on the slave side.

First of all, an atmel_spi_data structure have been added to describe which 
GPIO they use as CS line and as well to enable or not the use of the CS decode 
feature.
Then the at91_add_device_spi() has been revamped, it is now used to add a SPI 
*controller* device only. The boards need to register their SPI devices with 
spi_register_board_info().

All of this has been tested on a PortuxG20 board, as an example the last patch 
show how to use it.

As it is only an RFC for now, I didn't bother with other AT91 SoC than the 9G20.

Christian Gagneraud (3):
  AT91: SPI: Add CS decode support
  AT91: SPI: Split SPI controller device and SPI device
  AT91: SPI: Add example of platform specific CS/GPIO usage

 arch/arm/mach-at91/at91sam9260_devices.c |   60 ++++++-------
 arch/arm/mach-at91/board-stamp9g20.c     |   62 +++++++++++++-
 arch/arm/mach-at91/include/mach/board.h  |   11 ++-
 drivers/spi/atmel_spi.c                  |  137 ++++++++++++++++++++----------
 4 files changed, 189 insertions(+), 81 deletions(-)

-- 
1.7.4.1

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

end of thread, other threads:[~2011-05-31 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-31 16:04 [PATCH RFC 0/3] AT91: SPI: Add peripheral chip select decoding Christian Gagneraud
2011-05-31 16:04 ` [PATCH RFC 1/3] AT91: SPI: Add CS decode support Christian Gagneraud
2011-05-31 16:04 ` [PATCH RFC 2/3] AT91: SPI: Split SPI controller device and SPI device Christian Gagneraud
2011-05-31 16:04 ` [PATCH RFC 3/3] AT91: SPI: Add example of platform specific CS/GPIO usage Christian Gagneraud

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