linux-stable/drivers/spi
Javier Martinez Canillas e2689b946a spi: s3c64xx: Revert "spi: s3c64xx: Added provision for dedicated cs pin"
This reverts commit 3146beec21.

This commit resulted in a DT backward compatibility breakage.

Some devices use the native chip select (CS) instead of a GPIO
pin to drive the CS line. But the SPI driver made it mandatory
to specify a GPIO pin in the SPI device node controller-data.
So, using the built-in CS was not possible with the driver.

Commit 3146bee tried to fix that by adding a "cs-gpio" property
which could be defined in the SPI device node to make the driver
request the GPIO from the controller-data node.

Unfortunately that changed the old DT binding semantics since
now it's mandatory to have the "cs-gpio" property defined in
the SPI device node in order to use a GPIO pin to drive the CS.

As an example, a SPI device was defined before the commit with:

spi@12d20000 {
    slave-node@0 {
        controller-data {
             cs-gpio = <&gpb1 2 0>;
        }
   }
}

and after the commit, the following DTS snippet must be used:

spi@12d20000 {
    cs-gpio;
    slave-node@0 {
        controller-data {
             cs-gpio = <&gpb1 2 0>;
        }
   }
}

So, after commit 3146bee the driver does not look for the GPIO
by default and it only looks for it if the top level "cs-gpio"
property is defined while the default used to be the opposite.
To always request the GPIO defined in the controller-data node.

This means that old FDT that of course didn't have this added
"cs-gpio" DT property in the SPI node broke after this change.

The offending commit can't be reverted cleanly since more than
a year have passed and other changes were made in the meantime
but this patch partially reverts the driver to it's original
state so old FDT can work again.

This patch will break Device Trees that were relying on the new
behavior of course but the patch should be reverted because:

a) There aren't DTS in mainline that use this new property.
b) They were relying on a behavior that broke DT compatibility.
c) The new binding is awkard, needing two properties with the
   same name (cs-gpio) on different nodes is confusing at least.
d) The new property was not added to the DT binding doc:
   Documentation/devicetree/bindings/spi/spi-samsung.txt

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-17 19:37:41 +01:00
..
Kconfig Merge remote-tracking branches 'spi/topic/adi', 'spi/topic/atmel' and 'spi/topic/cadence' into spi-next 2014-06-02 17:08:35 +01:00
Makefile Merge remote-tracking branches 'spi/topic/adi', 'spi/topic/atmel' and 'spi/topic/cadence' into spi-next 2014-06-02 17:08:35 +01:00
spi-adi-v3.c spi: spi-adi-v3: convert to use common clk framework 2014-04-14 17:45:25 +01:00
spi-altera.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-ath79.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-atmel.c Merge remote-tracking branches 'spi/topic/adi', 'spi/topic/atmel' and 'spi/topic/cadence' into spi-next 2014-06-02 17:08:35 +01:00
spi-au1550.c Merge branch 'mips-for-linux-next' of git://git.linux-mips.org/pub/scm/ralf/upstream-sfr 2014-04-02 13:40:50 -07:00
spi-bcm63xx-hsspi.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-bcm63xx.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-bcm2835.c spi: Remove explictly set bus_num and num_chipselect to default setting 2014-02-16 09:51:02 +08:00
spi-bfin-sport.c spi: delete non-required instances of include <linux/init.h> 2014-02-03 12:20:35 +00:00
spi-bfin5xx.c spi: bfin5xx: fix build error 2014-04-14 20:44:15 +01:00
spi-bitbang-txrx.h spi: bitbang: Grammar s/make to make/to make/ 2014-01-13 11:24:21 +00:00
spi-bitbang.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-butterfly.c spi: bitbang: Make spi_bitbang_stop() return void 2014-03-29 11:09:26 +00:00
spi-cadence.c spi: Add driver for Cadence SPI controller 2014-04-14 21:00:28 +01:00
spi-clps711x.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-coldfire-qspi.c Merge remote-tracking branches 'spi/topic/bus-num', 'spi/topic/cleanup', 'spi/topic/clps711x', 'spi/topic/coldfire', 'spi/topic/completion' and 'spi/topic/davinci' into spi-next 2014-03-30 00:51:03 +00:00
spi-davinci.c spi: davinci: Use of_match_ptr at appropriate place 2014-02-06 12:52:59 +00:00
spi-dw-mid.c dmaengine: remove DMA unmap flags 2013-11-14 11:04:38 -08:00
spi-dw-mmio.c spi: dw: add support for gpio controlled chip select 2014-04-24 18:09:05 +01:00
spi-dw-pci.c Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/hspi', 'spi/topic/mpc512x', 'spi/topic/msiof', 'spi/topic/nuc900', 'spi/topic/oc-tiny', 'spi/topic/omap', 'spi/topic/orion' and 'spi/topic/pci' into spi-linus 2014-01-23 13:07:09 +00:00
spi-dw.c spi: dw: Remove unused dw_spi_cleanup function 2014-05-12 22:04:18 +01:00
spi-dw.h spi: dw: add support for gpio controlled chip select 2014-04-24 18:09:05 +01:00
spi-efm32.c Merge remote-tracking branches 'spi/topic/drivers', 'spi/topic/dw', 'spi/topic/efm32', 'spi/topic/ep93xx', 'spi/topic/fsl', 'spi/topic/fsl-dspi', 'spi/topic/fsl-espi' and 'spi/topic/gpio' into spi-next 2014-03-30 00:51:10 +00:00
spi-ep93xx.c spi: ep93xx: Convert to let spi core handle checking transfer speed 2014-02-14 20:24:53 +00:00
spi-falcon.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-fsl-cpm.c DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
spi-fsl-cpm.h
spi-fsl-dspi.c spi: fsl-dspi: Make of_device_id array const 2014-05-07 20:53:04 +01:00
spi-fsl-espi.c Merge remote-tracking branches 'spi/topic/dw', 'spi/topic/fsl', 'spi/topic/fsl-espi' and 'spi/topic/id-const' into spi-next 2014-06-02 17:08:38 +01:00
spi-fsl-lib.c spi: fsl: Kill mpc8xxx_spi_cleanup and convert fsl_espi_setup to use devm_kzalloc 2014-04-14 17:18:55 +01:00
spi-fsl-lib.h spi: fsl: Kill mpc8xxx_spi_cleanup and convert fsl_espi_setup to use devm_kzalloc 2014-04-14 17:18:55 +01:00
spi-fsl-spi.c spi: fsl-spi: Fix memory leak 2014-04-14 17:18:55 +01:00
spi-fsl-spi.h
spi-gpio.c spi: spi-gpio: Make of_device_id array const 2014-05-07 20:53:04 +01:00
spi-imx.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-lm70llp.c spi: bitbang: Let spi_bitbang_start() take a reference to master 2013-10-07 14:50:43 +01:00
spi-mpc52xx-psc.c Merge remote-tracking branches 'spi/fix/complete', 'spi/fix/efm32', 'spi/fix/omap2-mcspi' and 'spi/fix/qup' into spi-linus 2014-04-10 23:39:52 +01:00
spi-mpc52xx.c Merge remote-tracking branches 'spi/fix/complete', 'spi/fix/efm32', 'spi/fix/omap2-mcspi' and 'spi/fix/qup' into spi-linus 2014-04-10 23:39:52 +01:00
spi-mpc512x-psc.c Merge remote-tracking branches 'spi/fix/complete', 'spi/fix/efm32', 'spi/fix/omap2-mcspi' and 'spi/fix/qup' into spi-linus 2014-04-10 23:39:52 +01:00
spi-mxs.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-nuc900.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-oc-tiny.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-octeon.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-omap-100k.c spi: omap-100k: Fix memory leak 2014-03-29 10:01:13 +00:00
spi-omap-uwire.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-omap2-mcspi.c Merge remote-tracking branches 'spi/fix/complete', 'spi/fix/efm32', 'spi/fix/omap2-mcspi' and 'spi/fix/qup' into spi-linus 2014-04-10 23:39:52 +01:00
spi-orion.c Merge remote-tracking branches 'spi/topic/omap-uwire', 'spi/topic/omap100k', 'spi/topic/omap2', 'spi/topic/orion', 'spi/topic/pl022', 'spi/topic/qup', 'spi/topic/rspi' and 'spi/topic/s3c24xx' into spi-next 2014-03-30 00:51:27 +00:00
spi-pl022.c spi: pl022: remove unnecessary OOM messages 2014-04-29 12:01:41 -07:00
spi-ppc4xx.c spi: delete non-required instances of include <linux/init.h> 2014-02-03 12:20:35 +00:00
spi-pxa2xx-dma.c spi/pxa2xx: Prevent DMA from transferring too many bytes 2014-05-12 22:05:37 +01:00
spi-pxa2xx-pci.c spi/pxa2xx-pci: Add PCI mode support for BayTrail LPSS SPI 2014-04-18 18:06:07 +01:00
spi-pxa2xx-pxadma.c spi: delete non-required instances of include <linux/init.h> 2014-02-03 12:20:35 +00:00
spi-pxa2xx.c Merge remote-tracking branch 'spi/topic/workqueue' into spi-next 2014-06-02 17:08:43 +01:00
spi-pxa2xx.h
spi-qup.c Merge remote-tracking branches 'spi/topic/dw', 'spi/topic/fsl', 'spi/topic/fsl-espi' and 'spi/topic/id-const' into spi-next 2014-06-02 17:08:38 +01:00
spi-rspi.c spi: rspi: Extract rspi_common_transfer() 2014-06-02 15:49:36 +01:00
spi-s3c24xx-fiq.h
spi-s3c24xx-fiq.S
spi-s3c24xx.c Merge remote-tracking branch 'spi/topic/workqueue' into spi-next 2014-06-02 17:08:43 +01:00
spi-s3c64xx.c spi: s3c64xx: Revert "spi: s3c64xx: Added provision for dedicated cs pin" 2014-07-17 19:37:41 +01:00
spi-sc18is602.c spi: sc18is602: Convert to let spi core validate transfer speed 2014-03-13 09:47:05 +00:00
spi-sh-hspi.c spi: sh-hspi: Do not specifically request shyway_clk clock 2014-04-14 21:14:54 +01:00
spi-sh-msiof.c spi: sh-msiof: remove unnecessary OOM messages 2014-04-29 12:01:41 -07:00
spi-sh-sci.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-sh.c spi: Always check complete callback before calling it 2014-04-03 11:13:38 +01:00
spi-sirf.c spi: sirf: decrease the interrupt count and latency of PIO mode 2014-05-20 23:24:20 +01:00
spi-sun4i.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-sun6i.c spi: Remove unneeded include of linux/workqueue.h 2014-04-14 17:20:15 +01:00
spi-tegra20-sflash.c spi: tegra20-sflash: Make of_device_id array const 2014-05-07 20:53:05 +01:00
spi-tegra20-slink.c spi: tegra20-slink: Make of_device_id array const 2014-05-07 20:53:05 +01:00
spi-tegra114.c spi: tegra114: Make of_device_id array const 2014-05-07 20:53:05 +01:00
spi-ti-qspi.c Merge remote-tracking branches 'spi/topic/sunxi', 'spi/topic/tegra114', 'spi/topic/ti-qspi', 'spi/topic/ti-ssp', 'spi/topic/topcliff-pch', 'spi/topic/txx9', 'spi/topic/xcomm' and 'spi/topic/xfer' into spi-next 2014-03-30 00:51:41 +00:00
spi-tle62x0.c spi: tle62x0: remove unnecessary OOM messages 2014-04-29 12:01:42 -07:00
spi-topcliff-pch.c spi: topcliff-pch: remove unnecessary OOM messages 2014-04-29 12:01:42 -07:00
spi-txx9.c Merge remote-tracking branches 'spi/fix/complete', 'spi/fix/efm32', 'spi/fix/omap2-mcspi' and 'spi/fix/qup' into spi-linus 2014-04-10 23:39:52 +01:00
spi-xcomm.c Merge remote-tracking branches 'spi/topic/sunxi', 'spi/topic/tegra114', 'spi/topic/ti-qspi', 'spi/topic/ti-ssp', 'spi/topic/topcliff-pch', 'spi/topic/txx9', 'spi/topic/xcomm' and 'spi/topic/xfer' into spi-next 2014-03-30 00:51:41 +00:00
spi-xilinx.c Merge remote-tracking branches 'spi/topic/xilinx' and 'spi/topic/xtfpga' into spi-next 2014-03-30 00:51:48 +00:00
spi-xtensa-xtfpga.c spi: add xtfpga SPI controller driver 2014-03-13 09:12:44 +00:00
spi.c Merge remote-tracking branch 'spi/topic/dt' into spi-next 2014-06-02 17:08:35 +01:00
spidev.c spi: spidev: Add support for Dual/Quad SPI Transfers 2014-02-27 13:51:29 +09:00