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
     

13 Dec, 2009

2 commits

  • This patch is V2 of SPI Master support for the SuperH MSIOF.
    Full duplex, spi mode 0-3, active high cs, 3-wire and lsb
    first should all be supported, but the driver has so far
    only been tested with "mmc_spi".

    The MSIOF hardware comes with 32-bit FIFOs for receive and
    transmit, and this driver simply breaks the SPI messages
    into FIFO-sized chunks. The MSIOF hardware manages the pins
    for clock, receive and transmit (sck/miso/mosi), but the chip
    select pin is managed by software and must be configured as
    a regular GPIO pin by the board code.

    Performance wise there is still room for improvement, but
    on a Ecovec board with the built-in sh7724 MSIOF0 this driver
    gets Mini-sd read speeds of about half a megabyte per second.

    Future work include better clock setup and merging of 8-bit
    transfers into 32-bit words to reduce interrupt load and
    improve throughput.

    Signed-off-by: Magnus Damm
    Signed-off-by: Grant Likely

    Magnus Damm
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (151 commits)
    powerpc: Fix usage of 64-bit instruction in 32-bit altivec code
    MAINTAINERS: Add PowerPC patterns
    powerpc/pseries: Track previous CPPR values to correctly EOI interrupts
    powerpc/pseries: Correct pseries/dlpar.c build break without CONFIG_SMP
    powerpc: Make "intspec" pointers in irq_host->xlate() const
    powerpc/8xx: DTLB Miss cleanup
    powerpc/8xx: Remove DIRTY pte handling in DTLB Error.
    powerpc/8xx: Start using dcbX instructions in various copy routines
    powerpc/8xx: Restore _PAGE_WRITETHRU
    powerpc/8xx: Add missing Guarded setting in DTLB Error.
    powerpc/8xx: Fixup DAR from buggy dcbX instructions.
    powerpc/8xx: Tag DAR with 0x00f0 to catch buggy instructions.
    powerpc/8xx: Update TLB asm so it behaves as linux mm expects.
    powerpc/8xx: Invalidate non present TLBs
    powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
    pseries/pseries: Add code to online/offline CPUs of a DLPAR node
    powerpc: stop_this_cpu: remove the cpu from the online map.
    powerpc/pseries: Add kernel based CPU DLPAR handling
    sysfs/cpu: Add probe/release files
    powerpc/pseries: Kernel DLPAR Infrastructure
    ...

    Linus Torvalds
     

10 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     

09 Dec, 2009

5 commits


19 Nov, 2009

1 commit

  • wl1251 supports also that NVS is stored in a separate EEPROM, add support
    for that.

    kvalo: use platform data instead Kconfig and use kernel style

    Signed-off-by: David-John Willis
    Signed-off-by: Kalle Valo
    Signed-off-by: John W. Linville

    David-John Willis
     

09 Nov, 2009

1 commit


05 Nov, 2009

1 commit


27 Sep, 2009

1 commit

  • * 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
    backlight: new driver for ADP5520/ADP5501 MFD PMICs
    backlight: extend event support to also support poll()
    backlight/eeepc-laptop: Update the backlight state when we change brightness
    backlight/acpi: Update the backlight state when we change brightness
    backlight: Allow drivers to update the core, and generate events on changes
    backlight: switch to da903x driver to dev_pm_ops
    backlight: Add support for the Avionic Design Xanthos backlight device.
    backlight: spi driver for LMS283GF05 LCD
    backlight: move hp680-bl's probe function to .devinit.text
    backlight: Add support for new Apple machines.
    backlight: mbp_nvidia_bl: add support for MacBookAir 1,1
    backlight: Add WM831x backlight driver

    Trivial conflicts due to '#ifdef CONFIG_PM' differences in
    drivers/video/backlight/da903x_bl.c

    Linus Torvalds
     

23 Sep, 2009

4 commits

  • A GPIO driver for the Freescale MC33880 High/Low side switch

    Signed-off-by: Richard Röjfors
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Röjfors
     
  • Support two new half-duplex SPI implementation restrictions, for links
    that talk to TX-only or RX-only devices. (Existing half-duplex flavors
    support both transfer directions, just not at the same time.)

    Move spi_async() into the spi.c core, and stop inlining it. Then make
    that function perform error checks and reject messages that demand more
    than the underlying controller can support.

    Based on a patch from Marek Szyprowski which did this only for the
    bitbanged GPIO driver.

    Cc: Marek Szyprowski
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • With this patch spi drivers can use standard spi_driver.id_table and
    MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just like
    we do with I2C drivers.

    This is useful when a single driver supports several variants of devices
    but it is not possible to detect them in run-time (like non-JEDEC chips
    probing in drivers/mtd/devices/m25p80.c), and when platform_data usage is
    overkill.

    This patch also makes life a lot easier on OpenFirmware platforms, since
    with OF we extensively use proper device IDs in modaliases.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Add missing kernel-doc notation in spi.h for struct spi_master:

    Warning(include/linux/spi/spi.h:289): No description found for parameter 'mode_bits'
    Warning(include/linux/spi/spi.h:289): No description found for parameter 'flags'

    Signed-off-by: Randy Dunlap
    Acked-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap