25 May, 2010
1 commit
-
A number of files in drivers/spi fail checkincludes.pl due to the double
include of .The first include is needed to get the struct spi_bitbang definition and
the spi_bitbang_* function prototypes.The second include happens after defining EXPAND_BITBANG_TXRX to get the
inlined bitbang_txrx_* utility functions.The header is also included by a number of other
spi drivers, as well as some arch/ code, in order to use struct spi_bitbang
and the associated functions.To fix the double include, and remove any potential confusion about it, move
the inlined bitbang_txrx_* functions to a new private header in drivers/spi
and also remove the need to define EXPAND_BITBANG_TXRX.Signed-off-by: H Hartley Sweeten
Signed-off-by: Grant Likely
09 Nov, 2009
1 commit
-
This patch was generated by
git grep -E -i -l 's(le|el)ct' | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/
with only skipping net/netfilter/xt_SECMARK.c and
include/linux/netfilter/xt_SECMARK.h which have a struct member called
selctx.Signed-off-by: Uwe Kleine-König
Signed-off-by: Jiri Kosina
21 Feb, 2009
1 commit
-
This adds more documentation of the lowlevel API to avoid future bugs.
Signed-off-by: Michael Buesch
Acked-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Oct, 2008
1 commit
-
Fix compile error below:
LD drivers/spi/built-in.o
CC [M] drivers/spi/spi_gpio.o
In file included from drivers/spi/spi_gpio.c:26:
include/linux/spi/spi_bitbang.h:23: error: field `work' has incomplete type
make[2]: *** [drivers/spi/spi_gpio.o] Error 1
make[1]: *** [drivers/spi] Error 2
make: *** [drivers] Error 2Signed-off-by: Fernando Luis Vazquez Cao
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jul, 2007
1 commit
-
Minor SPI controller driver updates: make the setup() methods reject
spi->mode bits they don't support, by masking aginst the inverse of bits
they *do* support. This insures against misbehavior later when new mode
bits get added.Most controllers can't support SPI_LSB_FIRST; more handle SPI_CS_HIGH.
Support for all four SPI clock/transfer modes is routine.Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Mar, 2007
1 commit
-
Fix a bug in the cleanup of an spi_bitbang bus.
The workqueue associated with the bus was destroyed before the call to
spi_unregister_master. That meant that spi devices on that bus would be
unable to do IO in their remove method. The shutdown flag should have been
able to prevent a segfault, but was never getting set. By waiting to
destroy the workqueue until after the master is unregistered, devices are
able to do IO in their remove methods. An added benefit is that neither
the shutdown flag nor a wait for the queue of messages to empty is needed.Signed-off-by: Chris Lesiak
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Feb, 2007
1 commit
-
I'd like to assign NULL to kfree()d members of a structure. I can't do
that without ugly casting (see the PXA patch) when the structure pointed to
is const-qualified. I don't really see a reason why the cleanup method
isn't allowed to alter the object it should clean up. :-)No, I didn't test the PXA patch, but I verified that the NULL-assignment
doesn't stop me from doing rmmod/insmodding my own spi_bitbang-based
driver.Signed-off-by: Hans-Peter Nilsson
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 May, 2006
2 commits
-
Renamed bitbang_transfer_setup to follow convention of other exported symbols
from spi-bitbang. Exported spi_bitbang_setup_transfer to allow users of
spi-bitbang to use the function in their own setup_transfer.Signed-off-by: Kumar Gala
Cc: David Brownell
Signed-off-by: Greg Kroah-Hartman -
Some protocols (like one for some bitmap displays) require different clock
speed or word size settings for each transfer in an SPI message. This adds
those parameters to struct spi_transfer. They are to be used when they are
nonzero; otherwise the defaults from spi_device are to be used.The patch also adds a setup_transfer callback to spi_bitbang, uses it for
messages that use those overrides, and implements it so that the pure
bitbanging code can help resolve any questions about how it should work.Signed-off-by: Imre Deak
Signed-off-by: David Brownell
Signed-off-by: Greg Kroah-Hartman
14 Jan, 2006
2 commits
-
This makes the SPI core and its users access transfers in the SPI message
structure as linked list not as an array, as discussed on LKML.From: David Brownell
Updates including doc, bugfixes to the list code, add
spi_message_add_tail(). Plus, initialize things _before_ grabbing the
locks in some cases (in case it grows more expensive). This also merges
some bitbang updates of mine that didn't yet make it into the mm tree.Signed-off-by: Vitaly Wool
Signed-off-by: Dmitry Pervushin
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman -
This adds a bitbanging spi master, hooking up to board/adapter-specific glue
code which knows how to set and read the signals (gpios etc).This code kicks in after the glue code creates a platform_device with the
right platform_data. That data includes I/O loops, which will usually
come from expanding an inline function (provided in the header). One goal
is that the I/O loops should be easily optimized down to a few GPIO register
accesses, in common cases, for speed and minimized overhead.This understands all the currently defined protocol tweaking options in the
SPI framework, and might eventually serve as as reference implementation.- different word sizes (1..32 bits)
- differing clock rates
- SPI modes differing by CPOL (affecting chip select and I/O loops)
- SPI modes differing by CPHA (affecting I/O loops)
- delays (usecs) after transfers
- temporarily deselecting chips in mid-transferA lot of hardware could work with this framework, though common types of
controller can't reach peak performance without switching to a driver
structure that supports pipelining of transfers (e.g. DMA queues) and maybe
controllers (e.g. IRQ driven).Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman