spi: ath79: always call chipselect function
PATCH 1/2 spi: ath79: always call chipselect function
spi-bitbang has to call the chipselect function on the ath79 SPI driver in order to communicate with the SPI slave device, as the ath79 SPI driver has three dedicated chipselect lines but can also be used with GPIOs for the CS lines.
Fixes commit 4a07b8bcd503 ("spi: bitbang: Make chipselect callback optional")
--- drivers/spi/spi-ath79.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-ath79.c +1 -0
@@ -158,6 +158,7 @@ static int ath79_spi_probe(struct platform_device *pdev) master->bits_per_word_mask =SPI_BPW_RANGE_MASK (1 ,32 ); master->setup = spi_bitbang_setup; master->cleanup = spi_bitbang_cleanup; + master->flags =SPI_MASTER_GPIO_SS ;if (pdata) { master->bus_num = pdata->bus_num; master->num_chipselect = pdata->num_chipselect;
Signature · 1 line
2.30.1
PATCH 2/2 spi: ath79: remove spi-master setup and cleanup assignment
This removes the assignment of setup and cleanup functions for the ath79 target. Assigning the setup-method will lead to 'setup_transfer' not being assigned in spi_bitbang_init. Because of this, performing any TX/RX operation will lead to a kernel oops.
Also drop the redundant cleanup assignment, as it's also assigned in spi_bitbang_init.
--- drivers/spi/spi-ath79.c | 2 -- 1 file changed, 2 deletions(-)
drivers/spi/spi-ath79.c +0 -2
@@ -156,8 +156,6 @@ static int ath79_spi_probe(struct platform_device *pdev) master->use_gpio_descriptors = true; master->bits_per_word_mask =SPI_BPW_RANGE_MASK (1 ,32 ); - master->setup = spi_bitbang_setup; - master->cleanup = spi_bitbang_cleanup; master->flags =SPI_MASTER_GPIO_SS ;if (pdata) { master->bus_num = pdata->bus_num;
Signature · 1 line
2.30.1
Mark Brown
maintainerQuoted 6 lines · David Bauer
spi-bitbang has to call the chipselect function on the ath79 SPI driver in order to communicate with the SPI slave device, as the ath79 SPI driver has three dedicated chipselect lines but can also be used with GPIOs for the CS lines.
Fixes commit
4a07b8bcd503("spi: bitbang: Make chipselect callback optional")
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/2] spi: ath79: always call chipselect function
commit: 49fb4b971bac8e88070d8b6ea34fbdb57ca80cf6
[2/2] spi: ath79: remove spi-master setup and cleanup assignment
commit: 6a7e4db6eb8930a26469200a8b2e5bda7ca773fbAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark