linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] spi: ath79: always call chipselect function
@ 2021-03-03 16:08 David Bauer
  2021-03-03 16:08 ` [PATCH 2/2] spi: ath79: remove spi-master setup and cleanup assignment David Bauer
  2021-03-04 18:31 ` [PATCH 1/2] spi: ath79: always call chipselect function Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: David Bauer @ 2021-03-03 16:08 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi

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")

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 drivers/spi/spi-ath79.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c
index eb9a243e9526..436327fb58de 100644
--- a/drivers/spi/spi-ath79.c
+++ b/drivers/spi/spi-ath79.c
@@ -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;
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] spi: ath79: remove spi-master setup and cleanup assignment
  2021-03-03 16:08 [PATCH 1/2] spi: ath79: always call chipselect function David Bauer
@ 2021-03-03 16:08 ` David Bauer
  2021-03-04 18:31 ` [PATCH 1/2] spi: ath79: always call chipselect function Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: David Bauer @ 2021-03-03 16:08 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi

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.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 drivers/spi/spi-ath79.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c
index 436327fb58de..98ace748cd98 100644
--- a/drivers/spi/spi-ath79.c
+++ b/drivers/spi/spi-ath79.c
@@ -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;
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] spi: ath79: always call chipselect function
  2021-03-03 16:08 [PATCH 1/2] spi: ath79: always call chipselect function David Bauer
  2021-03-03 16:08 ` [PATCH 2/2] spi: ath79: remove spi-master setup and cleanup assignment David Bauer
@ 2021-03-04 18:31 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-03-04 18:31 UTC (permalink / raw)
  To: David Bauer; +Cc: linux-spi

On Wed, 3 Mar 2021 17:08:36 +0100, David Bauer wrote:
> 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: 6a7e4db6eb8930a26469200a8b2e5bda7ca773fb

All 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-04 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 16:08 [PATCH 1/2] spi: ath79: always call chipselect function David Bauer
2021-03-03 16:08 ` [PATCH 2/2] spi: ath79: remove spi-master setup and cleanup assignment David Bauer
2021-03-04 18:31 ` [PATCH 1/2] spi: ath79: always call chipselect function Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).