linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: chris@techworks.ie (Christian Gagneraud)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 0/3] AT91: SPI: Add peripheral chip select decoding
Date: Tue, 31 May 2011 17:04:20 +0100	[thread overview]
Message-ID: <1306857863-13424-1-git-send-email-chris@techworks.ie> (raw)

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

             reply	other threads:[~2011-05-31 16:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 16:04 Christian Gagneraud [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306857863-13424-1-git-send-email-chris@techworks.ie \
    --to=chris@techworks.ie \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).