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

    Linus Torvalds
     

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

    Grant Likely
     

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 platforms

    It 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 enabled

    Also 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

    Feng Tang
     

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 functionality

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Dirk Brandewie

    Sebastian Andrzej Siewior
     
  • 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_defconfig

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Dirk Brandewie

    Sebastian Andrzej Siewior
     

12 Nov, 2010

1 commit


01 Nov, 2010

1 commit


28 Oct, 2010

1 commit


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

    Feng Tang
     

07 Oct, 2010

1 commit


22 Sep, 2010

1 commit


21 Sep, 2010

1 commit


10 Sep, 2010

1 commit


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 them

    Signed-off-by: Feng Tang
    Signed-off-by: Grant Likely

    Feng Tang
     

03 Sep, 2010

1 commit


26 Aug, 2010

1 commit


18 Aug, 2010

1 commit


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 mutex

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

    Linus Torvalds
     

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

    Marc Kleine-Budde
     

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

    Marek Szyprowski
     
  • Tested-by: Anatolij Gustschin
    Signed-off-by: Dmitry Torokhov

    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 sleep

    Signed-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

    Ernst Schwab
     

28 Jun, 2010

1 commit


25 May, 2010

2 commits

  • Grant Likely
     
  • 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

    hartleys
     

24 Apr, 2010

1 commit


17 Apr, 2010

1 commit

  • wl1251 has WLAN_IRQ pin for generating interrupts to host processor,
    which is mandatory in SPI mode and optional in SDIO mode (which can
    use SDIO interrupts instead). However TI recommends using deditated
    IRQ line for SDIO too.

    Add support for using dedicated interrupt line with SDIO, but also leave
    ability to switch to SDIO interrupts in case it's needed.

    Signed-off-by: Grazvydas Ignotas
    Reviewed-by: Bob Copeland
    Signed-off-by: John W. Linville

    Grazvydas Ignotas
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

17 Mar, 2010

1 commit

  • The Epson LCD L4F00242T03 is mounted on the Freescale i.MX31 PDK board.
    Based upon Marek Vasut work in l4f00242t03.c, this driver provides
    basic init and power on/off functionality for this device through the
    sysfs lcd interface.

    Unfortunately Datasheet for this device are not available and
    all the control sequences sent to the display were copied from the
    freescale driver that in the i.MX31 Linux BSP.

    As in the i.MX31PDK board the core and io suppliers are voltage
    regulators, that functionality is embedded here, but not strict.

    Signed-off-by: Alberto Panizzo
    Signed-off-by: Richard Purdie

    Alberto Panizzo
     

11 Mar, 2010

1 commit

  • Add wakeup support to the ads7846 driver. Platforms can enable wakeup
    capability by setting the wakeup flag in ads7846_platform_data. With this
    patch the ads7846 driver can be used to wake the system from suspend.

    Signed-off-by: Ranjith Lohithakshan
    Signed-off-by: Dmitry Torokhov

    Ranjith Lohithakshan
     

10 Mar, 2010

1 commit

  • The AD7873 is almost identical to the ADS7846; the only difference is
    related to the Power Management bits PD0 and PD1. This results in a
    slightly different PENIRQ enable behavior. For the AD7873, VREF should
    be turned off during differential measurements.

    So, add the AD7873/43 to the list of driver supported devices, and prevent
    VREF usage during differential/ratiometric conversion modes.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Dmitry Torokhov

    Michael Hennerich
     

07 Mar, 2010

1 commit

  • Add the MAX7300-I2C variant of the MAX7301-SPI version. Both chips share
    the same core logic, so the generic part of the in-kernel SPI-driver is
    refactored into a generic part. The I2C and SPI specific funtions are
    then wrapped into seperate drivers picking up the generic part.

    Signed-off-by: Wolfram Sang
    Cc: Juergen Beisert
    Cc: David Brownell
    Cc: Jean Delvare
    Cc: Anton Vorontsov
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     

02 Feb, 2010

1 commit


30 Jan, 2010

1 commit


21 Jan, 2010

2 commits

  • The driver core allows for a platform-specific chipselect assert/deassert
    function, however the chipselect function in the core doesn't take advantage
    of this fact.

    This enables the use of a custom function, should it be defined.

    Signed-off-by: George Shore
    Signed-off-by: Grant Likely

    George Shore
     
  • Now dw_spi core fully supports 3 transfer modes: pure polling,
    DMA and IRQ mode. IRQ mode will use the FIFO half empty as
    the IRQ trigger, so each interface driver need set the fifo_len,
    so that core driver can handle it properly

    Signed-off-by: Feng Tang
    Signed-off-by: Grant Likely

    Feng Tang
     

19 Jan, 2010

1 commit


18 Dec, 2009

1 commit

  • * 'next-spi' of git://git.secretlab.ca/git/linux-2.6:
    spi: spi_txx9.c: use resource_size()
    spi: spi_sh_sci.c: use resource_size()
    spi: spi_mpc8xxx.c: use resource_size()
    spi: spi_bfin5xx.c: use resource_size()
    spi: atmel_spi.c: use resource_size()
    spi: Add s3c64xx SPI Controller driver
    atmel_spi: fix dma addr calculation for len > BUFFER_SIZE
    spi_s3c24xx: add FIQ pseudo-DMA support
    spi: controller driver for Designware SPI core
    spidev: add proper section markers
    spidev: use DECLARE_BITMAP instead of declaring the array

    Linus Torvalds
     

17 Dec, 2009

1 commit

  • Driver for the Designware SPI core, it supports multipul interfaces like
    PCI/APB etc. User can use "dw_apb_ssi_db.pdf" from Synopsys as HW
    datasheet.

    [randy.dunlap@oracle.com: fix build]
    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Feng Tang
    Cc: David Brownell
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Grant Likely

    Feng Tang
     

15 Dec, 2009

1 commit

  • * 'next-spi' of git://git.secretlab.ca/git/linux-2.6: (23 commits)
    spi: fix probe/remove section markings
    Add OMAP spi100k driver
    spi-imx: don't access struct device directly but use dev_get_platdata
    spi-imx: Add mx25 support
    spi-imx: use positive logic to distinguish cpu variants
    spi-imx: correct check for platform_get_irq failing
    ARM: NUC900: Add spi driver support for nuc900
    spi: SuperH MSIOF SPI Master driver V2
    spi: fix spidev compilation failure when VERBOSE is defined
    spi/au1550_spi: fix setupxfer not to override cfg with zeros
    spi/mpc8xxx: don't use __exit_p to wrap plat_mpc8xxx_spi_remove
    spi/i.MX: fix broken error handling for gpio_request
    spi/i.mx: drain MXC SPI transfer buffer when probing device
    MAINTAINERS: add SPI co-maintainer.
    spi/xilinx_spi: fix incorrect casting
    spi/mpc52xx-spi: minor cleanups
    xilinx_spi: add a platform driver using the xilinx_spi common module.
    xilinx_spi: add support for the DS570 IP.
    xilinx_spi: Switch to iomem functions and support little endian.
    xilinx_spi: Split into of driver and generic part.
    ...

    Linus Torvalds