aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bitbang.c
diff options
context:
space:
mode:
authorAlban Bedel <albeu@free.fr>2019-01-16 19:55:44 +0100
committerMark Brown <broonie@kernel.org>2019-01-17 12:34:14 +0000
commita666f2619a97ab9264d3b06055a336b3ee75c108 (patch)
tree7b8dc6f8f4f7f14d3272e2bfbaf32cb3e709c1a2 /drivers/spi/spi-bitbang.c
parentspi: cadence: Correct initialisation of runtime PM (diff)
downloadlinux-dev-a666f2619a97ab9264d3b06055a336b3ee75c108.tar.xz
linux-dev-a666f2619a97ab9264d3b06055a336b3ee75c108.zip
spi: bitbang: Don't call chipselect() in spi_bitbang_setup()
spi_setup() already call spi_set_cs() right after calling the controller setup method, so there is no need for the bitbang driver to do that. Because of this the chipselect() callback was confusingly still called when CS is GPIO based. Signed-off-by: Alban Bedel <albeu@free.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-bitbang.c')
-rw-r--r--drivers/spi/spi-bitbang.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c
index f29176000b8d..dd9a8c54a693 100644
--- a/drivers/spi/spi-bitbang.c
+++ b/drivers/spi/spi-bitbang.c
@@ -213,19 +213,6 @@ int spi_bitbang_setup(struct spi_device *spi)
dev_dbg(&spi->dev, "%s, %u nsec/bit\n", __func__, 2 * cs->nsecs);
- /* NOTE we _need_ to call chipselect() early, ideally with adapter
- * setup, unless the hardware defaults cooperate to avoid confusion
- * between normal (active low) and inverted chipselects.
- */
-
- /* deselect chip (low or high) */
- mutex_lock(&bitbang->lock);
- if (!bitbang->busy) {
- bitbang->chipselect(spi, BITBANG_CS_INACTIVE);
- ndelay(cs->nsecs);
- }
- mutex_unlock(&bitbang->lock);
-
return 0;
}
EXPORT_SYMBOL_GPL(spi_bitbang_setup);