18 Nov, 2011
1 commit
-
This patch introduces the module_spi_driver macro which is a convenience macro
for SPI driver modules similar to module_platform_driver. It is intended to be
used by drivers which init/exit section does nothing but register/unregister
the SPI driver. By using this macro it is possible to eliminate a few lines of
boilerplate code per SPI driver.Signed-off-by: Lars-Peter Clausen
Acked-by: Grant Likely
Acked-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman
01 Nov, 2011
1 commit
-
The regulator support in the l4f00242t03 is very non-idiomatic. Rather
than requesting the regulators based on the device name and the supply
names used by the device the driver requires boards to pass system
specific supply names around through platform data. The driver also
conditionally requests the regulators based on this platform data, adding
unneeded conditional code to the driver.Fix this by removing the platform data and converting to the standard
idiom, also updating all in tree users of the driver. As no datasheet
appears to be available for the LCD I'm guessing the names for the
supplies based on the existing users and I've no ability to do anything
more than compile test.The use of regulator_set_voltage() in the driver is also problematic,
since fixed voltages are required the expectation would be that the
voltages would be fixed in the constraints set by the machines rather than
manually configured by the driver, but is less problematic.Signed-off-by: Mark Brown
Tested-by: Fabio Estevam
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Jul, 2011
1 commit
-
There's no in-tree users, and bus notifiers are more generic anyway.
Signed-off-by: Peter Korsgaard
Signed-off-by: Grant Likely
04 Jun, 2011
1 commit
-
Remove the #define GEN_74X164_GPIO_COUNT since it's only used in
one place and it's meaning is obvious. Also remove the #define
GEN_74X164_DRIVER_NAME and use spi->modalias to set the gpio chip's
label and the string "74x164" for the driver name.Reorder the code slightly to remove the need to prototype
gen_74x164_set_value.Signed-off-by: H Hartley Sweeten
Signed-off-by: Grant Likely
27 May, 2011
1 commit
-
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6:
spi/amba-pl022: work in polling or interrupt mode if pl022_dma_probe fails
spi/spi_s3c24xx: Use spi_bitbang_stop instead of spi_unregister_master in s3c24xx_spi_remove
spi/spi_nuc900: Use spi_bitbang_stop instead of spi_unregister_master in nuc900_spi_remove
spi/spi_tegra: use spi_unregister_master() instead of spi_master_put()
spi/spi_sh: use spi_unregister_master instead of spi_master_put in remove path
spi: Use void pointers for data in simple SPI I/O operations
spi/pl022: use cpu_relax in the busy loop
spi/pl022: mark driver non-experimental
spi/pl022: timeout on polled transfer v2
spi/dw_spi: improve the interrupt mode with the batch ops
spi/dw_spi: change poll mode transfer from byte ops to batch ops
spi/dw_spi: remove the un-necessary flush()
spi/dw_spi: unify the low level read/write routines
20 May, 2011
1 commit
-
Currently the simple SPI I/O operations all take pointers to u8 * buffers
to operate on. This creates needless type compatibility issues and the
underlying spi_transfer structure uses void pointers anyway so convert the
API over to take void pointers too.Signed-off-by: Mark Brown
Signed-off-by: Grant Likely
12 May, 2011
1 commit
-
Just set vref_mv in your platform config to use external vref. Otherwise
the internal one is used.Signed-off-by: Alexander Stein
Signed-off-by: Dmitry Torokhov
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
20 Mar, 2011
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits)
Input: tsc2005 - remove 'disable' sysfs attribute
Input: tsc2005 - add open/close
Input: tsc2005 - handle read errors from SPI layer
Input: tsc2005 - do not rearm timer in hardirq handler
Input: tsc2005 - don't use work for 'pen up' handling
Input: tsc2005 - do not use 0 in place of NULL
Input: tsc2005 - use true/false for boolean variables
Input: tsc2005 - hide selftest attribute if we can't reset
Input: tsc2005 - rework driver initialization code
Input: tsc2005 - set up bus type in input device
Input: tsc2005 - set up parent device
Input: tsc2005 - clear driver data after unbinding
Input: tsc2005 - add module description
Input: tsc2005 - remove driver banner message
Input: tsc2005 - remove incorrect module alias
Input: tsc2005 - convert to using dev_pm_ops
Input: tsc2005 - use spi_get/set_drvdata()
Input: introduce tsc2005 driver
Input: xen-kbdfront - move to drivers/input/misc
Input: xen-kbdfront - add grant reference for shared page
...
19 Mar, 2011
1 commit
-
include/linux/dw_spi.h only includes driver internal data. It doesn't
expose a platform_data configuration structure or similar (at least
nothing in-tree). This patch moves the header into drivers/spi so
that the scope is limited to only the dw_spi_*.c driver filesSigned-off-by: Grant Likely
Cc: Feng Tang
Cc: spi-devel-general@lists.sourceforge.net
18 Mar, 2011
2 commits
-
Currently, build on PPC dies with:
In file included from drivers/spi/dw_spi_mmio.c:16:
include/linux/spi/dw_spi.h:147: error: field ‘tx_sgl’ has incomplete type
include/linux/spi/dw_spi.h:149: error: field ‘rx_sgl’ has incomplete typeAdd linux/scatterlist.h include to dw_spi.h, because we need to know
the contents of the structure.Signed-off-by: Jiri Slaby
Signed-off-by: Grant Likely -
Pull in Linus' tree to pick up changes required for the langwell gpio fixes
17 Mar, 2011
2 commits
-
Discussions:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26748.html
Introduce a driver for the Texas Instruments TSC2005 touchscreen
controller (http://focus.ti.com/docs/prod/folders/print/tsc2005.html).The patch is based on a driver by Lauri Leukkunen, with modifications
by David Brownell, Phil Carmody, Imre Deak, Hiroshi DOYU, Ari Kauppi,
Tony Lindgren, Jarkko Nikula, Eero Nurkkala and Roman Tereshonkov.Signed-off-by: Lauri Leukkunen
[aaro.koskinen@nokia.com: patch description, rebasing & cleanup]
Signed-off-by: Aaro Koskinen
[ext-srikar.1.bhavanarayana@nokia.com: various fixes]
Signed-off-by: Srikar
Signed-off-by: Dmitry Torokhov
12 Mar, 2011
1 commit
-
mpc23s17 is very similar to the mcp23s08, except that registers are 16bit
wide, so extend the interface to work with both variants.The s17 variant also has an additional address pin, so adjust platform
data structure to support up to 8 devices per SPI chipselect.Signed-off-by: Peter Korsgaard
Signed-off-by: Grant Likely
23 Feb, 2011
1 commit
-
This patch adds support of OpenCores tiny SPI driver.
http://opencores.org/project,tiny_spi
Signed-off-by: Thomas Chou
Signed-off-by: Grant Likely
04 Feb, 2011
1 commit
-
Some platform attributes (e.g. max_hz, use_dma) were being intuited
from the modem type. These things should be specified by the platform
data.Added max_hz, use_dma to ifx_modem_platform_data definition,
replaced is_6160 w/ modem_type, and changed clients accordinglySigned-off-by: Russ Gorby
Signed-off-by: Greg Kroah-Hartman
08 Jan, 2011
1 commit
-
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6: (77 commits)
spi/omap: Fix DMA API usage in OMAP MCSPI driver
spi/imx: correct the test on platform_get_irq() return value
spi/topcliff: Typo fix threhold to threshold
spi/dw_spi Typo change diable to disable.
spi/fsl_espi: change the read behaviour of the SPIRF
spi/mpc52xx-psc-spi: move probe/remove to proper sections
spi/dw_spi: add DMA support
spi/dw_spi: change to EXPORT_SYMBOL_GPL for exported APIs
spi/dw_spi: Fix too short timeout in spi polling loop
spi/pl022: convert running variable
spi/pl022: convert busy flag to a bool
spi/pl022: pass the returned sglen to the DMA engine
spi/pl022: map the buffers on the DMA engine
spi/topcliff_pch: Fix data transfer issue
spi/imx: remove autodetection
spi/pxa2xx: pass of_node to spi device and set a parent device
spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes.
spi/pxa2xx: Add chipselect support for Sodaville
spi/pxa2xx: Consider CE4100's FIFO depth
spi/pxa2xx: Add CE4100 support
...
29 Dec, 2010
1 commit
-
* 'spi' of git://git.linutronix.de/users/bigeasy/soda into spi/next
spi/pxa2xx: register driver properly
spi/pxa2xx: add support for shared IRQ handler
spi/pxa2xx: Use define for SSSR_TFL_MASK instead of plain numbers
arm/pxa2xx: reorgazine SSP and SPI header files
spi/pxa2xx: Add CE4100 support
spi/pxa2xx: Consider CE4100's FIFO depth
spi/pxa2xx: Add chipselect support for Sodaville
spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes.
spi/pxa2xx: pass of_node to spi device and set a parent device
24 Dec, 2010
1 commit
-
dw_spi driver in upstream only supports PIO mode, and this patch
will support it to cowork with the Designware dma controller used
on Intel Moorestown platform, at the same time it provides a general
framework to support dw_spi core to cowork with dma controllers on
other platformsIt has been tested with a Option GTM501L 3G modem and Infenion 60x60
modem. To use DMA mode, DMA controller 2 of Moorestown has to be enabledAlso change the dma interface suggested by Linus Walleij.
Acked-by: Linus Walleij
Signed-off-by: Feng Tang
[Typo fix and renames to match intel_mid_dma renaming]
Signed-off-by: Vinod Koul
Signed-off-by: Alan Cox
Signed-off-by: Grant Likely
01 Dec, 2010
2 commits
-
Sodaville's SPI controller is very much the same as in PXA25x. The
difference:
- The RX/TX FIFO is only 4 words deep instead of 16
- No DMA support
- The SPI controller offers a CS functionalitySigned-off-by: Sebastian Andrzej Siewior
Signed-off-by: Dirk Brandewie -
The PXA-SPI driver relies on some files / defines which are arm specific
and are within the ARM tree. The CE4100 SoC which is x86 has also the
SPI core.
This patch moves the ssp and spi files from arm/mach-pxa and plat-pxa to
include/linux where the CE4100 can access them.This move got verified by building the following defconfigs:
cm_x2xx_defconfig corgi_defconfig em_x270_defconfig ezx_defconfig
imote2_defconfig pxa3xx_defconfig spitz_defconfig zeus_defconfig
raumfeld_defconfig magician_defconfigSigned-off-by: Sebastian Andrzej Siewior
Signed-off-by: Dirk Brandewie
12 Nov, 2010
1 commit
-
Prototype driver for the IFX6x60 series of SPI attached modems by Jim
Stanley and Russ GorbySigned-off-by: Russ Gorby
[Some reworking and a major cleanup]
Signed-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman
01 Nov, 2010
1 commit
-
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6:
spi/pl022: fix erroneous platform data in U300
spi: fixed odd static string conventions in core code
spi/bfin_spi: only request GPIO on first load
spi/bfin_spi: handle error/status changes after data interrupts
spi: enable spi_board_info to be registered after spi_master
28 Oct, 2010
1 commit
-
Add support for generic 74x164 serial-in/parallel-out 8-bits shift
register. This driver can be used as a GPIO output expander.[akpm@linux-foundation.org: remove unused local `refresh']
Signed-off-by: Miguel Gaio
Signed-off-by: Juhos Gabor
Signed-off-by: Florian Fainelli
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Oct, 2010
1 commit
-
Currently spi_register_board_info() has to be called before its related
spi_master be registered, otherwise these board info will be just ignored.This patch will remove this order limit, it adds a global spi master list
like the existing global board info listr. Whenever a board info or a
spi_master is registered, the spi master list or board info list
will be scanned, and a new spi device will be created if there is a
master-board info match.Signed-off-by: Feng Tang
Signed-off-by: Grant Likely
07 Oct, 2010
1 commit
-
Conflicts:
drivers/net/pcmcia/pcnet_cs.c
net/caif/caif_socket.c
22 Sep, 2010
1 commit
-
…wireless-next-2.6 into for-davem
Conflicts:
arch/arm/mach-omap2/board-omap3pandora.c
drivers/net/wireless/ath/ath5k/base.c
21 Sep, 2010
1 commit
-
Move wl12xx.h outside of the spi-specific location,
so it can be shared with both spi and sdio solutions.Update all users of spi/wl12xx.h accordingly
Signed-off-by: Ohad Ben-Cohen
Acked-by: Luciano Coelho
Acked-by: Tony Lindgren
Signed-off-by: John W. Linville
10 Sep, 2010
1 commit
-
Conflicts:
net/mac80211/main.c
09 Sep, 2010
1 commit
-
commit 052dc7c45i "spi/dw_spi: conditional transfer mode change"
introduced cs_control code, which has a bug by using bit offset
for spi mode to set transfer mode in control register. Also it
forces devices who don't need cs_control to re-configure the
control registers for each spi transfer. This patch will fix themSigned-off-by: Feng Tang
Signed-off-by: Grant Likely
03 Sep, 2010
1 commit
-
…wireless-next-2.6 into for-davem
26 Aug, 2010
1 commit
-
Luciano should be the contact person for the include/linux/spi/wl12xx.h file.
Signed-off-by: Kalle Valo
Acked-by: Luciano Coelho
Signed-off-by: John W. Linville
18 Aug, 2010
1 commit
-
Added comments in kernel-doc notation for previously added struct fields.
Signed-off-by: Ernst Schwab
Acked-by: Randy Dunlap
Signed-off-by: Grant Likely
15 Aug, 2010
1 commit
-
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6:
spi/amba_pl022: Fix probe and remove hook section annotations.
spi/mpc5121: change annotations for probe and remove functions
spi/bitbang: reinitialize transfer parameters for every message
spi/spi-gpio: add support for controllers without MISO or MOSI pin
spi/bitbang: add support for SPI_MASTER_NO_{TX, RX} modes
SPI100k: Fix 8-bit and RX-only transfers
spi/mmc_spi: mmc_spi adaptations for SPI bus locking API
spi/mmc_spi: SPI bus locking API, using mutexFix trivial conflict in drivers/spi/mpc512x_psc_spi.c due to 'struct
of_device' => 'struct platform_device' rename and __init/__exit to
__devinit/__devexit fix.
11 Aug, 2010
1 commit
-
The gpios on the max730x chips have support for internal pullups while in
input mode.This patch adds support for configuring these pullups via platform data.
A new member ("input_pullup_active") to the platform data struct is
introduced. A set bit in this variable activates the pullups while the
respective port is in input mode. This is a compatible enhancement since
unset bits lead to disables pullups which was the default in the original
driver._Note_: the 4 lowest bits in "input_pullup_active" are unused because the
first 4 ports of the controller are not used, too.Signed-off-by: Marc Kleine-Budde
Reviewed-by: Wolfram Sang
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Jul, 2010
2 commits
-
There are some boards that do not strictly follow SPI standard and use
only 3 wires (SCLK, MOSI or MISO, SS) for connecting some simple auxiliary
chips and controls them with GPIO based 'spi controller'. In this
configuration the MISO or MOSI line is missing (it is not required if the
chip does not transfer any data back to host or host only reads data from
chip).This patch adds support for such non-standard configuration in GPIO-based
SPI controller. It has been tested in configuration without MISO pin.Reviewed-by: Kyungmin Park
Signed-off-by: Marek Szyprowski
Acked-by: David Brownell
Signed-off-by: Grant Likely -
Tested-by: Anatolij Gustschin
Signed-off-by: Dmitry Torokhov
29 Jun, 2010
1 commit
-
SPI bus locking API to allow exclusive access to the SPI bus, especially, but
not limited to, for the mmc_spi driver.Coded according to an outline from Grant Likely; here is his
specification (accidentally swapped function names corrected):It requires 3 things to be added to struct spi_master.
- 1 Mutex
- 1 spin lock
- 1 flag.The mutex protects spi_sync, and provides sleeping "for free"
The spinlock protects the atomic spi_async call.
The flag is set when the lock is obtained, and checked while holding
the spinlock in spi_async(). If the flag is checked, then spi_async()
must fail immediately.The current runtime API looks like this:
spi_async(struct spi_device*, struct spi_message*);
spi_sync(struct spi_device*, struct spi_message*);The API needs to be extended to this:
spi_async(struct spi_device*, struct spi_message*)
spi_sync(struct spi_device*, struct spi_message*)
spi_bus_lock(struct spi_master*) /* although struct spi_device* might
be easier */
spi_bus_unlock(struct spi_master*)
spi_async_locked(struct spi_device*, struct spi_message*)
spi_sync_locked(struct spi_device*, struct spi_message*)Drivers can only call the last two if they already hold the spi_master_lock().
spi_bus_lock() obtains the mutex, obtains the spin lock, sets the
flag, and releases the spin lock before returning. It doesn't even
need to sleep while waiting for "in-flight" spi_transactions to
complete because its purpose is to guarantee no additional
transactions are added. It does not guarantee that the bus is idle.spi_bus_unlock() clears the flag and releases the mutex, which will
wake up any waiters.The difference between spi_async() and spi_async_locked() is that the
locked version bypasses the check of the lock flag. Both versions
need to obtain the spinlock.The difference between spi_sync() and spi_sync_locked() is that
spi_sync() must hold the mutex while enqueuing a new transfer.
spi_sync_locked() doesn't because the mutex is already held. Note
however that spi_sync must *not* continue to hold the mutex while
waiting for the transfer to complete, otherwise only one transfer
could be queued up at a time!Almost no code needs to be written. The current spi_async() and
spi_sync() can probably be renamed to __spi_async() and __spi_sync()
so that spi_async(), spi_sync(), spi_async_locked() and
spi_sync_locked() can just become wrappers around the common code.spi_sync() is protected by a mutex because it can sleep
spi_async() needs to be protected with a flag and a spinlock because
it can be called atomically and must not sleepSigned-off-by: Ernst Schwab
[grant.likely@secretlab.ca: use spin_lock_irqsave()]
Signed-off-by: Grant Likely
Tested-by: Matt Fleming
Tested-by: Antonio Ospite
28 Jun, 2010
1 commit
-
On some platforms, for example with GPIO interrupts on mpc5121,
it is not possible to configure falling edge interrupts.Specifying irq trigger type in platform data structure
allows using ads7846 driver on such platforms.Signed-off-by: Anatolij Gustschin
Signed-off-by: Dmitry Torokhov