diff options
author | Lukas Wunner <lukas@wunner.de> | 2020-02-18 15:08:00 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-21 16:50:36 +0300 |
commit | 138c9c32f090894614899eca15e0bb7279f59865 (patch) | |
tree | 18d9d16b9fa2b80237666a4b6c67d906f2017ba0 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 136b5cd2e2f97581ae560cff0db2a3b5369112da (diff) | |
download | linux-138c9c32f090894614899eca15e0bb7279f59865.tar.xz |
spi: spidev: Fix CS polarity if GPIO descriptors are used
Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs")
amended of_spi_parse_dt() to always set SPI_CS_HIGH for SPI slaves whose
Chip Select is defined by a "cs-gpios" devicetree property.
This change broke userspace applications which issue an SPI_IOC_WR_MODE
ioctl() to an spidev: Chip Select polarity will be incorrect unless the
application is changed to set SPI_CS_HIGH. And once changed, it will be
incompatible with kernels not containing the commit.
Fix by setting SPI_CS_HIGH in spidev_ioctl() (under the same conditions
as in of_spi_parse_dt()).
Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs")
Reported-by: Simon Han <z.han@kunbus.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/fca3ba7cdc930cd36854666ceac4fbcf01b89028.1582027457.git.lukas@wunner.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org # v5.1+
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions