diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-04-03 07:01:32 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-04-08 10:10:39 +0300 |
commit | 45beec3519983cb11768cd3ee350f44975bf4cea (patch) | |
tree | 8478c95e78c9a66983d3802c68ccd9582bf51373 /include/linux/spi | |
parent | 8b797490b4db09492acda4b4a4a4355d2311a614 (diff) | |
download | linux-45beec3519983cb11768cd3ee350f44975bf4cea.tar.xz |
spi: bitbang: Introduce spi_bitbang_init()
Move all of the code doing struct spi_bitbang initialization, so that
it can be paired with devm_spi_register_master() in order to avoid
having to call spi_bitbang_stop() explicitly.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Chris Healy <cphealy@gmail.com>
Cc: linux-spi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/spi_bitbang.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index b7e021b274dc..4444c2a992cb 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h @@ -44,6 +44,7 @@ extern int spi_bitbang_setup_transfer(struct spi_device *spi, /* start or stop queue processing */ extern int spi_bitbang_start(struct spi_bitbang *spi); +extern int spi_bitbang_init(struct spi_bitbang *spi); extern void spi_bitbang_stop(struct spi_bitbang *spi); #endif /* __SPI_BITBANG_H */ |