Skip to contentSkip to conversation

spi: ath79: drop platform data

PATCH In review David Bauer 2 participants 3 messages May 22, 2021 – May 24, 2021 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 spi: ath79: drop platform data

The ath79 platform has been converted to pure OF. The platform data is not needed anymore because of this.

---
 drivers/spi/spi-ath79.c                 |  8 --------
 include/linux/platform_data/spi-ath79.h | 16 ----------------
 2 files changed, 24 deletions(-)
 delete mode 100644 include/linux/platform_data/spi-ath79.h
drivers/spi/spi-ath79.c +0 -8
index 98ace748cd98..497d5c028496 100644
@@ -19,7 +19,6 @@
 #include <linux/bitops.h>
 #include <linux/clk.h>
 #include <linux/err.h>
-#include <linux/platform_data/spi-ath79.h>
 
 #define DRV_NAME	"ath79-spi"
 
@@ -138,7 +137,6 @@ static int ath79_spi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct ath79_spi *sp;
-	struct ath79_spi_platform_data *pdata;
 	unsigned long rate;
 	int ret;
 
@@ -152,15 +150,9 @@ static int ath79_spi_probe(struct platform_device *pdev)
 	master->dev.of_node = pdev->dev.of_node;
 	platform_set_drvdata(pdev, sp);
 
-	pdata = dev_get_platdata(&pdev->dev);
-
 	master->use_gpio_descriptors = true;
 	master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
 	master->flags = SPI_MASTER_GPIO_SS;
-	if (pdata) {
-		master->bus_num = pdata->bus_num;
-		master->num_chipselect = pdata->num_chipselect;
-	}
 
 	sp->bitbang.master = master;
 	sp->bitbang.chipselect = ath79_spi_chipselect;
include/linux/platform_data/spi-ath79.h deleted +0 -16
deleted file mode 100644
index 81a388ff58cc..000000000000
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  Platform data definition for Atheros AR71XX/AR724X/AR913X SPI controller
- *
- *  Copyright (C) 2008-2010 Gabor Juhos <[email protected]>
- */
-
-#ifndef _ATH79_SPI_PLATFORM_H
-#define _ATH79_SPI_PLATFORM_H
-
-struct ath79_spi_platform_data {
-	unsigned	bus_num;
-	unsigned	num_chipselect;
-};
-
-#endif /* _ATH79_SPI_PLATFORM_H */
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/2 spi: ath79: set number of chipselect lines

All chipsets from AR7100 up to QCA9563 have three dedicated chipselect lines for the integrated SPI controller. Set the number of chipselect lines available on the controller to this value.

---
 drivers/spi/spi-ath79.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-ath79.c +1 -0
index 497d5c028496..d1e287d2d9cd 100644
@@ -153,6 +153,7 @@ 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->flags = SPI_MASTER_GPIO_SS;
+	master->num_chipselect = 3;
 
 	sp->bitbang.master = master;
 	sp->bitbang.chipselect = ath79_spi_chipselect;
Signature · 1 line
2.31.1
maintainer
#2 lore raw
In reply to David Bauer
Quoted 2 lines · David Bauer

The ath79 platform has been converted to pure OF. The platform data is not needed anymore because of this.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: ath79: drop platform data

      commit: 42a7dfa26fc6df1624d7c2955200e5053dd0b818
[2/2] spi: ath79: set number of chipselect lines
      commit: ab053f48f9264ed5c714d0427b3115f121d4c476

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