diff options
author | Barry Song <barry.song@analog.com> | 2009-11-17 09:45:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-18 02:49:36 -0400 |
commit | d3cc71f71ae13596cb988e16bfa2b15f09fb7347 (patch) | |
tree | 6fcd5e9401931dbce719bcdfd1e5b4075f392598 /drivers/spi/omap_uwire.c | |
parent | 0d2c6de2255cb299fdd77d4543738adee45f4f3f (diff) | |
download | blackbird-op-linux-d3cc71f71ae13596cb988e16bfa2b15f09fb7347.tar.gz blackbird-op-linux-d3cc71f71ae13596cb988e16bfa2b15f09fb7347.zip |
spi/bfin_spi: redo GPIO CS handling
The common SPI layers take care of detecting CS conflicts and preventing
two devices from claiming the same CS. This causes problems for the GPIO
CS support we currently have as we are using CS0 to mean "GPIO CS". But
if we have multiple devices using a GPIO CS, the common SPI layers see
multiple devices using the virtual "CS0" and reject any such attempts.
To make both work, we introduce an offset define. This represents the
max number of hardware CS values that the SPI peripheral supports. If
the CS is below this limit, we know we can use the hardware CS. If it's
above, we treat it as a GPIO CS. This keeps the CS unique as seen by
the common code and prevents conflicts.
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/spi/omap_uwire.c')
0 files changed, 0 insertions, 0 deletions