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

    Lars-Peter Clausen
     

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

    Mark Brown
     

16 Jul, 2011

1 commit


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

    H Hartley Sweeten
     

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

    Linus Torvalds
     

20 May, 2011

1 commit


12 May, 2011

1 commit


31 Mar, 2011

1 commit


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

    Linus Torvalds
     

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 files

    Signed-off-by: Grant Likely
    Cc: Feng Tang
    Cc: spi-devel-general@lists.sourceforge.net

    Grant Likely
     

18 Mar, 2011

2 commits


17 Mar, 2011

2 commits

  • Dmitry Torokhov
     
  • 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

    Lauri Leukkunen
     

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

    Peter Korsgaard
     

23 Feb, 2011

1 commit


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 accordingly

    Signed-off-by: Russ Gorby
    Signed-off-by: Greg Kroah-Hartman

    Russ Gorby
     

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