spi: bitbang: Introduce spi_bitbang_init()
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Wed, 3 Apr 2019 04:01:32 +0000 (21:01 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2019 07:10:39 +0000 (14:10 +0700)
commit45beec3519983cb11768cd3ee350f44975bf4cea
tree8478c95e78c9a66983d3802c68ccd9582bf51373
parent8b797490b4db09492acda4b4a4a4355d2311a614
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>
drivers/spi/spi-bitbang.c
include/linux/spi/spi_bitbang.h