android_kernel_motorola_sm6375/drivers/spi
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kris Bahnsen 9e8440a657 spi: spi-gpio: Don't set MOSI as an input if not 3WIRE mode
[ Upstream commit 3a6f994f848a69deb2bf3cd9d130dd0c09730e55 ]

The addition of 3WIRE support would affect MOSI direction even
when still in standard (4 wire) mode. This can lead to MOSI being
at an invalid logic level when a device driver sets an SPI
message with a NULL tx_buf.

spi.h states that if tx_buf is NULL then "zeros will be shifted
out ... " If MOSI is tristated then the data shifted out is subject
to pull resistors, keepers, or in the absence of those, noise.

This issue came to light when using spi-gpio connected to an
ADS7843 touchscreen controller. MOSI pulled high when clocking
MISO data in caused the SPI device to interpret this as a command
which would put the device in an unexpected and non-functional
state.

Fixes: 4b859db2c6 ("spi: spi-gpio: add SPI_3WIRE support")
Fixes: 5132b3d283 ("spi: gpio: Support 3WIRE high-impedance turn-around")
Signed-off-by: Kris Bahnsen <kris@embeddedTS.com>
Link: https://lore.kernel.org/r/20221207230853.6174-1-kris@embeddedTS.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:41:12 +01:00
..
atmel-quadspi.c spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller 2022-04-27 13:50:50 +02:00
internals.h
Kconfig
Makefile
spi-altera.c
spi-armada-3700.c spi: change clk_disable_unprepare to clk_unprepare 2021-12-29 12:23:34 +01:00
spi-at91-usart.c
spi-ath79.c
spi-atmel.c
spi-au1550.c
spi-axi-spi-engine.c
spi-bcm-qspi.c spi: bcm-qspi: fix MSPI only access with bcm_qspi_exec_mem_op() 2022-04-15 14:18:38 +02:00
spi-bcm-qspi.h
spi-bcm63xx-hsspi.c
spi-bcm63xx.c
spi-bcm2835.c spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers 2022-07-29 17:14:16 +02:00
spi-bcm2835aux.c
spi-bitbang-txrx.h
spi-bitbang.c spi: Cleanup on failure of initial setup 2021-06-16 11:59:38 +02:00
spi-brcmstb-qspi.c
spi-butterfly.c
spi-cadence.c spi: cadence: Correct initialisation of runtime PM again 2021-07-28 13:30:56 +02:00
spi-cavium-octeon.c
spi-cavium-thunderx.c
spi-cavium.c
spi-cavium.h
spi-clps711x.c
spi-coldfire-qspi.c
spi-davinci.c
spi-dln2.c
spi-dw-mid.c
spi-dw-mmio.c
spi-dw-pci.c
spi-dw.c
spi-dw.h
spi-efm32.c
spi-ep93xx.c
spi-falcon.c
spi-fsl-cpm.c
spi-fsl-cpm.h
spi-fsl-dspi.c spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config 2021-09-15 09:47:29 +02:00
spi-fsl-espi.c
spi-fsl-lib.c
spi-fsl-lib.h
spi-fsl-lpspi.c
spi-fsl-qspi.c
spi-fsl-spi.c spi: Cleanup on failure of initial setup 2021-06-16 11:59:38 +02:00
spi-fsl-spi.h
spi-geni-qcom.c spi: spi-geni-qcom: Fix use-after-free on unbind 2021-06-03 08:59:06 +02:00
spi-gpio.c spi: spi-gpio: Don't set MOSI as an input if not 3WIRE mode 2023-01-18 11:41:12 +01:00
spi-img-spfi.c spi: img-spfi: Fix pm_runtime_get_sync() error checking 2022-06-14 18:11:33 +02:00
spi-imx.c spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock 2022-12-08 11:23:02 +01:00
spi-iproc-qspi.c
spi-jcore.c
spi-lantiq-ssc.c
spi-lm70llp.c
spi-loopback-test.c spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' 2021-07-14 16:53:10 +02:00
spi-lp8841-rtc.c
spi-mem.c
spi-meson-spicc.c spi: meson-spicc: add IRQ check in meson_spicc_probe 2022-02-08 18:24:30 +01:00
spi-meson-spifc.c spi: spi-meson-spifc: Add missing pm_runtime_disable() in meson_spifc_probe 2022-01-27 09:19:37 +01:00
spi-mpc52xx-psc.c
spi-mpc52xx.c
spi-mpc512x-psc.c
spi-mt65xx.c spi: mediatek: Avoid NULL pointer crash in interrupt 2022-02-08 18:24:30 +01:00
spi-mt7621.c
spi-mxic.c spi: mxic: Fix the transmit path 2022-04-15 14:17:59 +02:00
spi-mxs.c
spi-npcm-fiu.c
spi-npcm-pspi.c
spi-nxp-fspi.c spi: spi-nxp-fspi: move the register operation after the clock enable 2021-06-30 08:47:44 -04:00
spi-oc-tiny.c
spi-omap-100k.c spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe 2022-10-26 13:22:25 +02:00
spi-omap-uwire.c spi: Cleanup on failure of initial setup 2021-06-16 11:59:38 +02:00
spi-omap2-mcspi.c spi: Cleanup on failure of initial setup 2021-06-16 11:59:38 +02:00
spi-orion.c
spi-pic32-sqi.c
spi-pic32.c spi: spi-pic32: Fix issue with uninitialized dma_slave_config 2021-09-15 09:47:29 +02:00
spi-pl022.c spi: spl022: fix Microwire full duplex mode 2021-11-17 09:48:21 +01:00
spi-ppc4xx.c
spi-pxa2xx-dma.c
spi-pxa2xx-pci.c spi: pxa2xx-pci: Balance reference count for PCI DMA device 2022-04-15 14:18:04 +02:00
spi-pxa2xx.c spi: Cleanup on failure of initial setup 2021-06-16 11:59:38 +02:00
spi-pxa2xx.h
spi-qcom-qspi.c
spi-qup.c spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() 2022-10-26 13:22:23 +02:00
spi-rb4xx.c
spi-rockchip.c
spi-rspi.c spi: spi-rspi: Fix PIO fallback on RZ platforms 2022-08-25 11:17:32 +02:00
spi-s3c24xx-fiq.h
spi-s3c24xx-fiq.S
spi-s3c24xx.c
spi-s3c64xx.c spi: s3c64xx: Fix large transfers with DMA 2022-10-26 13:22:25 +02:00
spi-sc18is602.c
spi-sh-hspi.c
spi-sh-msiof.c
spi-sh-sci.c
spi-sh.c
spi-sifive.c
spi-sirf.c
spi-slave-mt27xx.c
spi-slave-system-control.c
spi-slave-time.c
spi-sprd-adi.c spi: sprd: Fix the wrong WDG_LOAD_VAL 2021-09-15 09:47:30 +02:00
spi-sprd.c spi: sprd: Add missing MODULE_DEVICE_TABLE 2021-06-16 11:59:34 +02:00
spi-st-ssc4.c
spi-stm32-qspi.c spi: stm32-qspi: Fix wait_cmd timeout in APM mode 2022-06-14 18:11:27 +02:00
spi-stm32.c spi: stm32: fix stm32_spi_prepare_mbr() that halves spi clk for every run 2022-12-08 11:22:57 +01:00
spi-sun4i.c
spi-sun6i.c spi: spi-sun6i: Fix chipselect/clock bug 2021-07-14 16:53:24 +02:00
spi-synquacer.c spi: synquacer: Add missing clk_disable_unprepare() 2022-08-25 11:17:30 +02:00
spi-tegra20-sflash.c
spi-tegra20-slink.c spi: tegra20: Use of_device_get_match_data() 2022-04-15 14:18:23 +02:00
spi-tegra114.c spi: tegra114: Add missing IRQ check in tegra_spi_probe 2022-04-15 14:18:04 +02:00
spi-test.h
spi-ti-qspi.c spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout 2022-06-14 18:11:32 +02:00
spi-tle62x0.c
spi-topcliff-pch.c spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages() 2021-07-14 16:53:10 +02:00
spi-txx9.c
spi-uniphier.c
spi-xcomm.c
spi-xilinx.c
spi-xlp.c
spi-xtensa-xtfpga.c
spi-zynq-qspi.c spi: spi-zynq-qspi: Fix a NULL pointer dereference in zynq_qspi_exec_mem_op() 2022-03-02 11:41:10 +01:00
spi-zynqmp-gqspi.c
spi.c spi: Fix erroneous sgs value with min_t() 2022-04-15 14:17:56 +02:00
spidev.c spi: spidev: mask SPI_CS_HIGH in SPI_IOC_RD_MODE 2023-01-18 11:41:08 +01:00