]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 19:03:22 +0000 (11:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 19:03:22 +0000 (11:03 -0800)
Pull SPI changes from Grant Likely:
 "Changes to both core spi code and spi device drivers.  The driver
  changes are the usual set of bug fixes and platform enablement.

  Core code changes include:

   - More intelligent assignment of SPI bus numbers when using DT

   - Common mechanism for using gpios as CS lines

   - Pull checks for bits_per_word and transfer speed out of drivers and
     into core code

   - Ensure temporary DMA buffers are DMA safe"

* tag 'spi-for-linus' of git://git.secretlab.ca/git/linux: (50 commits)
  spi: Document cs_gpios and cs_gpio in kernel-doc
  spi/of: Fix initialization of cs_gpios array
  spi/pxa2xx: add support for Lynxpoint SPI controllers
  spi/pxa2xx: add support for Intel Low Power Subsystem SPI
  spi/pxa2xx: add support for SPI_LOOP
  spi/pxa2xx: add support for runtime PM
  spi/pxa2xx: add support for DMA engine
  spi/pxa2xx: break out the private DMA API usage into a separate file
  spi/ath79: add shutdown handler
  spi/mips-lantiq: set SPI_MASTER_HALF_DUPLEX flag
  spi/mips-lantiq: make use of spi_finalize_current_message
  spi/bcm63xx: work around inability to keep CS up
  spi/davinci: use request_threaded_irq() to fix deadlock
  spi/orion: Use module_platform_driver()
  spi/bcm63xx: reject transfers unable to transfer
  spi: Ensure memory used for spi_write_then_read() is DMA safe
  spi/spi-mpc512x-psc: init mode bits supported by the driver
  spi/mpc512x-psc: don't use obsolet cell-index property
  spi: Remove erroneous __init, __exit and __exit_p() references in drivers
  spi/s3c64xx: fix checkpatch warnings and error
  ...

1  2 
MAINTAINERS
drivers/spi/spi.c

diff --combined MAINTAINERS
index b1f98503ebda09506beadad33a74b9799e2f7cbf,1a747dde9bcb01e65c932b2f85313e94b7e03346..70f025fbbd33611f9fad3be00a15f05b58859f6a
@@@ -1303,7 -1303,7 +1303,7 @@@ F:      include/linux/dmaengine.
  F:    include/linux/async_tx.h
  
  AT24 EEPROM DRIVER
 -M:    Wolfram Sang <w.sang@pengutronix.de>
 +M:    Wolfram Sang <wsa@the-dreams.de>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
  F:    drivers/misc/eeprom/at24.c
@@@ -1489,7 -1489,7 +1489,7 @@@ AVR32 ARCHITECTUR
  M:    Haavard Skinnemoen <hskinnemoen@gmail.com>
  M:    Hans-Christian Egtvedt <egtvedt@samfundet.no>
  W:    http://www.atmel.com/products/AVR32/
 -W:    http://avr32linux.org/
 +W:    http://mirror.egtvedt.no/avr32linux.org/
  W:    http://avrfreaks.net/
  S:    Maintained
  F:    arch/avr32/
@@@ -2140,10 -2140,10 +2140,10 @@@ S:   Maintaine
  F:    tools/power/cpupower
  
  CPUSETS
 -M:    Paul Menage <paul@paulmenage.org>
 +M:    Li Zefan <lizefan@huawei.com>
  W:    http://www.bullopensource.org/cpuset/
  W:    http://oss.sgi.com/projects/cpusets/
 -S:    Supported
 +S:    Maintained
  F:    Documentation/cgroups/cpusets.txt
  F:    include/linux/cpuset.h
  F:    kernel/cpuset.c
@@@ -3757,11 -3757,12 +3757,11 @@@ S:   Maintaine
  F:    drivers/i2c/i2c-stub.c
  
  I2C SUBSYSTEM
 -M:    Wolfram Sang <w.sang@pengutronix.de>
 +M:    Wolfram Sang <wsa@the-dreams.de>
  M:    "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
  L:    linux-i2c@vger.kernel.org
  W:    http://i2c.wiki.kernel.org/
 -T:    quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/
 -T:    git git://git.pengutronix.de/git/wsa/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
  S:    Maintained
  F:    Documentation/i2c/
  F:    drivers/i2c/
@@@ -5777,6 -5778,15 +5777,6 @@@ L:     linux-i2c@vger.kernel.or
  S:    Maintained
  F:    drivers/i2c/muxes/i2c-mux-pca9541.c
  
 -PCA9564/PCA9665 I2C BUS DRIVER
 -M:    Wolfram Sang <w.sang@pengutronix.de>
 -L:    linux-i2c@vger.kernel.org
 -S:    Maintained
 -F:    drivers/i2c/algos/i2c-algo-pca.c
 -F:    drivers/i2c/busses/i2c-pca-*
 -F:    include/linux/i2c-algo-pca.h
 -F:    include/linux/i2c-pca-platform.h
 -
  PCDP - PRIMARY CONSOLE AND DEBUG PORT
  M:    Khalid Aziz <khalid@gonehiking.org>
  S:    Maintained
@@@ -6588,7 -6598,7 +6588,7 @@@ F:      drivers/dma/dw_dmac_regs.
  F:    drivers/dma/dw_dmac.c
  
  TIMEKEEPING, NTP
 -M:    John Stultz <johnstul@us.ibm.com>
 +M:    John Stultz <john.stultz@linaro.org>
  M:    Thomas Gleixner <tglx@linutronix.de>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
  S:    Supported
@@@ -7168,6 -7178,7 +7168,7 @@@ F:      drivers/clk/spear
  
  SPI SUBSYSTEM
  M:    Grant Likely <grant.likely@secretlab.ca>
+ M:    Mark Brown <broonie@opensource.wolfsonmicro.com>
  L:    spi-devel-general@lists.sourceforge.net
  Q:    http://patchwork.kernel.org/project/spi-devel-general/list/
  T:    git git://git.secretlab.ca/git/linux-2.6.git
@@@ -7533,11 -7544,6 +7534,11 @@@ F:    drivers/net/team
  F:    include/linux/if_team.h
  F:    include/uapi/linux/if_team.h
  
 +TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT
 +M:    Savoir-faire Linux Inc. <kernel@savoirfairelinux.com>
 +S:    Maintained
 +F:    arch/x86/platform/ts5500/
 +
  TECHNOTREND USB IR RECEIVER
  M:    Sean Young <sean@mess.org>
  L:    linux-media@vger.kernel.org
@@@ -7612,22 -7618,6 +7613,22 @@@ F:    Documentation/backlight/lp855x-drive
  F:    drivers/video/backlight/lp855x_bl.c
  F:    include/linux/platform_data/lp855x.h
  
 +TI LP8727 CHARGER DRIVER
 +M:    Milo Kim <milo.kim@ti.com>
 +S:    Maintained
 +F:    drivers/power/lp8727_charger.c
 +F:    include/linux/platform_data/lp8727.h
 +
 +TI LP8788 MFD DRIVER
 +M:    Milo Kim <milo.kim@ti.com>
 +S:    Maintained
 +F:    drivers/iio/adc/lp8788_adc.c
 +F:    drivers/leds/leds-lp8788.c
 +F:    drivers/mfd/lp8788*.c
 +F:    drivers/power/lp8788-charger.c
 +F:    drivers/regulator/lp8788-*.c
 +F:    include/linux/mfd/lp8788*.h
 +
  TI TWL4030 SERIES SOC CODEC DRIVER
  M:    Peter Ujfalusi <peter.ujfalusi@ti.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
diff --combined drivers/spi/spi.c
index 3a6083b386a134416c13b7f8e2c08cbe2e0fef11,6707cb2f4fa40243c424507ad7ab44d17e3dc628..4fffb1f39def24d7ef6c87c2b89dd1c441ff8257
@@@ -33,7 -33,7 +33,7 @@@
  #include <linux/of_gpio.h>
  #include <linux/pm_runtime.h>
  #include <linux/export.h>
 -#include <linux/sched.h>
 +#include <linux/sched/rt.h>
  #include <linux/delay.h>
  #include <linux/kthread.h>
  #include <linux/ioport.h>
@@@ -1080,7 -1080,8 +1080,8 @@@ static int of_spi_register_master(struc
        if (!master->cs_gpios)
                return -ENOMEM;
  
-       memset(cs, -EINVAL, master->num_chipselect);
+       for (i = 0; i < master->num_chipselect; i++)
+               cs[i] = -EINVAL;
  
        for (i = 0; i < nb; i++)
                cs[i] = of_get_named_gpio(np, "cs-gpios", i);
@@@ -1135,6 -1136,9 +1136,9 @@@ int spi_register_master(struct spi_mast
        if (master->num_chipselect == 0)
                return -EINVAL;
  
+       if ((master->bus_num < 0) && master->dev.of_node)
+               master->bus_num = of_alias_get_id(master->dev.of_node, "spi");
        /* convention:  dynamically assigned bus IDs count down from the max */
        if (master->bus_num < 0) {
                /* FIXME switch to an IDR based scheme, something like
@@@ -1366,12 -1370,14 +1370,14 @@@ static int __spi_async(struct spi_devic
        }
  
        /**
-        * Set transfer bits_per_word as spi device default if it is not
-        * set for this transfer.
+        * Set transfer bits_per_word and max speed as spi device default if
+        * it is not set for this transfer.
         */
        list_for_each_entry(xfer, &message->transfers, transfer_list) {
                if (!xfer->bits_per_word)
                        xfer->bits_per_word = spi->bits_per_word;
+               if (!xfer->speed_hz)
+                       xfer->speed_hz = spi->max_speed_hz;
        }
  
        message->spi = spi;
@@@ -1656,7 -1662,8 +1662,8 @@@ int spi_write_then_read(struct spi_devi
         * using the pre-allocated buffer or the transfer is too large.
         */
        if ((n_tx + n_rx) > SPI_BUFSIZ || !mutex_trylock(&lock)) {
-               local_buf = kmalloc(max((unsigned)SPI_BUFSIZ, n_tx + n_rx), GFP_KERNEL);
+               local_buf = kmalloc(max((unsigned)SPI_BUFSIZ, n_tx + n_rx),
+                                   GFP_KERNEL | GFP_DMA);
                if (!local_buf)
                        return -ENOMEM;
        } else {