WSL2-Linux-Kernel/drivers/spi
Sourav Poddar db90a44177 spi: conditional checking of mode and transfer bits.
There is a bug in the following patch:
http://comments.gmane.org/gmane.linux.kernel.spi.devel/14420

spi: DUAL and QUAD support

    fix the previous patch some mistake below:
    1. DT in slave node, use "spi-tx-nbits = <1/2/4>" in place of using
       "spi-tx-dual, spi-tx-quad" directly, same to rx. So correct the
       previous way to get the property in @of_register_spi_devices().
    2. Change the value of transfer bit macro(SPI_NBITS_SINGLE, SPI_NBITS_DUAL
       SPI_NBITS_QUAD) to 0x01, 0x02 and 0x04 to match the actual wires.
    3. Add the following check
       (1)keep the tx_nbits and rx_nbits in spi_transfer is not beyond the
          single, dual and quad.
       (2)keep tx_nbits and rx_nbits are contained by @spi_device->mode
          example: if @spi_device->mode = DUAL, then tx/rx_nbits can not be set
                   to QUAD(SPI_NBITS_QUAD)
       (3)if "@spi_device->mode & SPI_3WIRE", then tx/rx_nbits should be in
          single(SPI_NBITS_SINGLE)

Checking of the tx/rx transfer bits and mode bits should be done conditionally
based on type of buffer filled else EINVAL condition will
always get hit either for rx or tx.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 19:05:39 +01:00
..
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-07-13 14:52:21 -07:00
Makefile spi/tegra114: add spi driver 2013-04-07 10:08:00 +01:00
spi-altera.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-ath79.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-atmel.c Merge remote-tracking branch 'spi/topic/bpw' into spi-next 2013-06-26 16:20:57 +01:00
spi-au1550.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-bcm63xx.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-bcm2835.c spi: bmc2835: use devm_ioremap_resource() 2013-05-13 18:10:51 +04:00
spi-bfin-sport.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-bfin5xx.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-bitbang-txrx.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-bitbang.c Merge branch 'broonie/spi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git 2013-02-05 12:30:13 +00:00
spi-butterfly.c spi: Add module.h to implicit users in drivers/spi 2011-10-31 19:32:17 -04:00
spi-clps711x.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-coldfire-qspi.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-davinci.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-06-26 16:21:02 +01:00
spi-dw-mid.c dmaengine/dma_slave: introduce inline wrappers 2012-03-21 19:20:22 +05:30
spi-dw-mmio.c spi: remove unnecessary platform_set_drvdata() 2013-05-13 18:00:30 +04:00
spi-dw-pci.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-dw.c spi: convert drivers to use bits_per_word_mask 2013-05-29 20:48:17 +01:00
spi-dw.h spi: spi-dw: fix all sparse warnings 2011-09-21 09:41:48 -06:00
spi-ep93xx.c Merge remote-tracking branch 'spi/topic/ep93xx' into spi-next 2013-06-26 16:20:58 +01:00
spi-falcon.c spi/mips-lantiq: set SPI_MASTER_HALF_DUPLEX flag 2013-02-05 17:16:55 +00:00
spi-fsl-cpm.c spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-cpm.h spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-espi.c spi: fix build break in spi-fsl-espi.c 2013-06-01 19:46:16 +01:00
spi-fsl-lib.c spi: spi-fsl-lib: Make mpc8xxx_spi_work static 2013-06-04 18:40:51 +01:00
spi-fsl-lib.h spi/spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores 2013-04-07 10:07:57 +01:00
spi-fsl-spi.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-fsl-spi.h spi/spi-fsl-spi: Add support for Aeroflex Gaisler GRLIB cores normally running on SPARC 2013-04-07 10:07:56 +01:00
spi-gpio.c Merge remote-tracking branch 'spi/topic/core' into spi-next 2013-06-26 16:20:58 +01:00
spi-imx.c Merge remote-tracking branch 'spi/topic/imx' into spi-next 2013-06-26 16:20:59 +01:00
spi-lm70llp.c spi: By default setup spi_masters with 1 chipselect and dynamics bus number 2012-05-19 23:42:08 -06:00
spi-mpc52xx-psc.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-mpc52xx.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-mpc512x-psc.c spi: mpc512x: use the SPI subsystem's message queue 2013-06-04 18:22:48 +01:00
spi-mxs.c Merge remote-tracking branch 'spi/topic/mxs' into spi-next 2013-06-26 16:21:00 +01:00
spi-nuc900.c Merge remote-tracking branch 'spi/topic/nuc900' into spi-next 2013-06-26 16:21:01 +01:00
spi-oc-tiny.c spi: remove unnecessary platform_set_drvdata() 2013-05-13 18:00:30 +04:00
spi-octeon.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-omap-100k.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-06-26 16:21:02 +01:00
spi-omap-uwire.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-omap2-mcspi.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-06-26 16:21:02 +01:00
spi-orion.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-pl022.c Pin control changes for the v3.11 kernel cycle: 2013-07-03 11:48:03 -07:00
spi-ppc4xx.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-06-26 16:21:02 +01:00
spi-pxa2xx-dma.c Merge remote-tracking branch 'spi/topic/pxa' into spi-next 2013-06-26 16:21:03 +01:00
spi-pxa2xx-pci.c spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions() 2013-03-12 18:30:56 +00:00
spi-pxa2xx-pxadma.c spi/pxa2xx: break out the private DMA API usage into a separate file 2013-02-08 12:15:21 +00:00
spi-pxa2xx.c Merge remote-tracking branch 'spi/topic/pxa' into spi-next 2013-06-26 16:21:03 +01:00
spi-pxa2xx.h spi/pxa2xx: add support for Intel Low Power Subsystem SPI 2013-02-08 13:14:40 +00:00
spi-rspi.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-s3c24xx-fiq.S spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx-fiq.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx.c spi: spi-s3c24xx: Remove redundant platform_set_drvdata() 2013-06-01 20:17:36 +01:00
spi-s3c64xx.c Merge remote-tracking branch 'spi/topic/s3c64xx' into spi-next 2013-06-26 16:21:04 +01:00
spi-sc18is602.c spi/sc18is602: Return -EINVAL for probe failures due to I2C function mismatch 2012-08-23 12:13:54 +01:00
spi-sh-hspi.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-06-26 16:21:02 +01:00
spi-sh-msiof.c spi: spi-sh-msiof: Use of_match_ptr() macro 2013-04-01 14:27:14 +01:00
spi-sh-sci.c spi: Add module.h to implicit users in drivers/spi 2011-10-31 19:32:17 -04:00
spi-sh.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-sirf.c Merge remote-tracking branch 'spi/topic/sirf' into spi-next 2013-06-26 16:21:04 +01:00
spi-tegra20-sflash.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-tegra20-slink.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-tegra114.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-ti-ssp.c spi: convert drivers to use bits_per_word_mask 2013-05-29 20:48:17 +01:00
spi-tle62x0.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-topcliff-pch.c Merge remote-tracking branch 'spi/topic/topcliff' into spi-next 2013-06-26 16:21:05 +01:00
spi-txx9.c Merge remote-tracking branch 'spi/topic/txx9' into spi-next 2013-06-26 16:21:05 +01:00
spi-xcomm.c spi: convert drivers to use bits_per_word_mask 2013-05-29 20:48:17 +01:00
spi-xilinx.c Merge remote-tracking branch 'spi/topic/xilinx' into spi-next 2013-06-26 16:21:06 +01:00
spi.c spi: conditional checking of mode and transfer bits. 2013-08-22 19:05:39 +01:00
spidev.c spi/spidev: Use PTR_RET function 2013-04-01 14:32:32 +01:00