2024-02-07 18:52:21

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH v3 00/32] spi: get rid of some legacy macros

Changes since v2
(https://lore.kernel.org/linux-spi/[email protected]):

- Drop patch "mtd: rawnand: fsl_elbc: Let .probe retry if local bus is
missing" which doesn't belong into this series.
- Fix a build failure noticed by the kernel build bot in
drivers/spi/spi-au1550.c. (I failed to catch this because this driver
is mips only, but not enabled in a mips allmodconfig. That's a bit
unfortunate, but not easily fixable.)
- Add the Reviewed-by: and Acked-by: tags I received for v2.

Mark already announced for v2 that he is willing to apply the whole
series to his spi tree. Assuming no other show stoper are found in this
v3, I assume that's the plan still for this series now.

Thanks
Uwe

Uwe Kleine-König (32):
fpga: ice40-spi: Follow renaming of SPI "master" to "controller"
ieee802154: ca8210: Follow renaming of SPI "master" to "controller"
iio: adc: ad_sigma_delta: Follow renaming of SPI "master" to "controller"
Input: pxspad - follow renaming of SPI "master" to "controller"
Input: synaptics-rmi4 - follow renaming of SPI "master" to "controller"
media: mgb4: Follow renaming of SPI "master" to "controller"
media: netup_unidvb: Follow renaming of SPI "master" to "controller"
media: usb/msi2500: Follow renaming of SPI "master" to "controller"
media: v4l2-subdev: Follow renaming of SPI "master" to "controller"
misc: gehc-achc: Follow renaming of SPI "master" to "controller"
mmc: mmc_spi: Follow renaming of SPI "master" to "controller"
mtd: dataflash: Follow renaming of SPI "master" to "controller"
net: ks8851: Follow renaming of SPI "master" to "controller"
net: vertexcom: mse102x: Follow renaming of SPI "master" to "controller"
platform/chrome: cros_ec_spi: Follow renaming of SPI "master" to "controller"
spi: bitbang: Follow renaming of SPI "master" to "controller"
spi: cadence-quadspi: Don't emit error message on allocation error
spi: cadence-quadspi: Follow renaming of SPI "master" to "controller"
spi: cavium: Follow renaming of SPI "master" to "controller"
spi: geni-qcom: Follow renaming of SPI "master" to "controller"
spi: loopback-test: Follow renaming of SPI "master" to "controller"
spi: slave-mt27xx: Follow renaming of SPI "master" to "controller"
spi: spidev: Follow renaming of SPI "master" to "controller"
staging: fbtft: Follow renaming of SPI "master" to "controller"
staging: greybus: spi: Follow renaming of SPI "master" to "controller"
tpm_tis_spi: Follow renaming of SPI "master" to "controller"
usb: gadget: max3420_udc: Follow renaming of SPI "master" to "controller"
video: fbdev: mmp: Follow renaming of SPI "master" to "controller"
wifi: libertas: Follow renaming of SPI "master" to "controller"
spi: fsl-lib: Follow renaming of SPI "master" to "controller"
spi: Drop compat layer from renaming "master" to "controller"
Documentation: spi: Update documentation for renaming "master" to "controller"

.../driver-api/driver-model/devres.rst | 2 +-
Documentation/spi/spi-summary.rst | 74 +++++++++----------
drivers/char/tpm/tpm_tis_spi_main.c | 4 +-
drivers/fpga/ice40-spi.c | 4 +-
drivers/iio/adc/ad_sigma_delta.c | 14 ++--
drivers/input/joystick/psxpad-spi.c | 4 +-
drivers/input/rmi4/rmi_spi.c | 2 +-
drivers/media/pci/mgb4/mgb4_core.c | 14 ++--
.../media/pci/netup_unidvb/netup_unidvb_spi.c | 48 ++++++------
drivers/media/usb/msi2500/msi2500.c | 38 +++++-----
drivers/media/v4l2-core/v4l2-spi.c | 4 +-
drivers/misc/gehc-achc.c | 8 +-
drivers/mmc/host/mmc_spi.c | 6 +-
drivers/mtd/devices/mtd_dataflash.c | 2 +-
drivers/net/ethernet/micrel/ks8851_spi.c | 4 +-
drivers/net/ethernet/vertexcom/mse102x.c | 2 +-
drivers/net/ieee802154/ca8210.c | 2 +-
.../net/wireless/marvell/libertas/if_spi.c | 2 +-
drivers/platform/chrome/cros_ec_spi.c | 8 +-
drivers/spi/spi-ath79.c | 4 +-
drivers/spi/spi-au1550.c | 2 +-
drivers/spi/spi-bitbang.c | 64 ++++++++--------
drivers/spi/spi-butterfly.c | 6 +-
drivers/spi/spi-cadence-quadspi.c | 7 +-
drivers/spi/spi-cavium.c | 6 +-
drivers/spi/spi-cavium.h | 2 +-
drivers/spi/spi-davinci.c | 6 +-
drivers/spi/spi-fsl-lib.c | 14 ++--
drivers/spi/spi-geni-qcom.c | 2 +-
drivers/spi/spi-gpio.c | 2 +-
drivers/spi/spi-lm70llp.c | 6 +-
drivers/spi/spi-loopback-test.c | 4 +-
drivers/spi/spi-oc-tiny.c | 6 +-
drivers/spi/spi-omap-uwire.c | 4 +-
drivers/spi/spi-sh-sci.c | 10 +--
drivers/spi/spi-slave-mt27xx.c | 2 +-
drivers/spi/spi-xilinx.c | 4 +-
drivers/spi/spi-xtensa-xtfpga.c | 2 +-
drivers/spi/spi.c | 2 +-
drivers/spi/spidev.c | 2 +-
drivers/staging/fbtft/fbtft-core.c | 4 +-
drivers/staging/greybus/spilib.c | 66 ++++++++---------
drivers/usb/gadget/udc/max3420_udc.c | 2 +-
drivers/video/fbdev/mmp/hw/mmp_spi.c | 26 +++----
include/linux/spi/spi.h | 20 +----
include/linux/spi/spi_bitbang.h | 2 +-
include/media/v4l2-common.h | 6 +-
47 files changed, 253 insertions(+), 272 deletions(-)


base-commit: b9b98f594b6f4c0b0fb2da4493453aef183bca4b
--
2.43.0



2024-02-07 18:53:32

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH v3 15/32] platform/chrome: cros_ec_spi: Follow renaming of SPI "master" to "controller"

In commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"")
some functions and struct members were renamed. To not break all drivers
compatibility macros were provided.

To be able to remove these compatibility macros push the renaming into
this driver.

Acked-by: Tzung-Bi Shih <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/platform/chrome/cros_ec_spi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_spi.c b/drivers/platform/chrome/cros_ec_spi.c
index 3e88cc92e819..86a3d32a7763 100644
--- a/drivers/platform/chrome/cros_ec_spi.c
+++ b/drivers/platform/chrome/cros_ec_spi.c
@@ -409,7 +409,7 @@ static int do_cros_ec_pkt_xfer_spi(struct cros_ec_device *ec_dev,
if (!rx_buf)
return -ENOMEM;

- spi_bus_lock(ec_spi->spi->master);
+ spi_bus_lock(ec_spi->spi->controller);

/*
* Leave a gap between CS assertion and clocking of data to allow the
@@ -469,7 +469,7 @@ static int do_cros_ec_pkt_xfer_spi(struct cros_ec_device *ec_dev,

final_ret = terminate_request(ec_dev);

- spi_bus_unlock(ec_spi->spi->master);
+ spi_bus_unlock(ec_spi->spi->controller);

if (!ret)
ret = final_ret;
@@ -554,7 +554,7 @@ static int do_cros_ec_cmd_xfer_spi(struct cros_ec_device *ec_dev,
if (!rx_buf)
return -ENOMEM;

- spi_bus_lock(ec_spi->spi->master);
+ spi_bus_lock(ec_spi->spi->controller);

/* Transmit phase - send our message */
debug_packet(ec_dev->dev, "out", ec_dev->dout, len);
@@ -590,7 +590,7 @@ static int do_cros_ec_cmd_xfer_spi(struct cros_ec_device *ec_dev,

final_ret = terminate_request(ec_dev);

- spi_bus_unlock(ec_spi->spi->master);
+ spi_bus_unlock(ec_spi->spi->controller);

if (!ret)
ret = final_ret;
--
2.43.0


2024-02-07 18:54:28

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH v3 22/32] spi: slave-mt27xx: Follow renaming of SPI "master" to "controller"

In commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"")
some functions and struct members were renamed. To not break all drivers
compatibility macros were provided.

To be able to remove these compatibility macros push the renaming into
this driver.

Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/spi/spi-slave-mt27xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-slave-mt27xx.c b/drivers/spi/spi-slave-mt27xx.c
index 6d6772974783..f1ddf4c099a3 100644
--- a/drivers/spi/spi-slave-mt27xx.c
+++ b/drivers/spi/spi-slave-mt27xx.c
@@ -297,7 +297,7 @@ static int mtk_spi_slave_transfer_one(struct spi_controller *ctlr,

static int mtk_spi_slave_setup(struct spi_device *spi)
{
- struct mtk_spi_slave *mdata = spi_controller_get_devdata(spi->master);
+ struct mtk_spi_slave *mdata = spi_controller_get_devdata(spi->controller);
u32 reg_val;

reg_val = DMA_DONE_EN | DATA_DONE_EN |
--
2.43.0


2024-02-07 18:54:34

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH v3 30/32] spi: fsl-lib: Follow renaming of SPI "master" to "controller"

In commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"")
some functions and struct members were renamed. To not break all drivers
compatibility macros were provided.

To be able to remove these compatibility macros push the renaming into
this driver.

Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/spi/spi-fsl-lib.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/spi/spi-fsl-lib.c b/drivers/spi/spi-fsl-lib.c
index 885757c29fbb..4fc2c56555b5 100644
--- a/drivers/spi/spi-fsl-lib.c
+++ b/drivers/spi/spi-fsl-lib.c
@@ -82,18 +82,18 @@ void mpc8xxx_spi_probe(struct device *dev, struct resource *mem,
unsigned int irq)
{
struct fsl_spi_platform_data *pdata = dev_get_platdata(dev);
- struct spi_master *master;
+ struct spi_controller *ctlr;
struct mpc8xxx_spi *mpc8xxx_spi;

- master = dev_get_drvdata(dev);
+ ctlr = dev_get_drvdata(dev);

/* the spi->mode bits understood by this driver: */
- master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH
+ ctlr->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH
| SPI_LSB_FIRST | SPI_LOOP;

- master->dev.of_node = dev->of_node;
+ ctlr->dev.of_node = dev->of_node;

- mpc8xxx_spi = spi_master_get_devdata(master);
+ mpc8xxx_spi = spi_controller_get_devdata(ctlr);
mpc8xxx_spi->dev = dev;
mpc8xxx_spi->get_rx = mpc8xxx_spi_rx_buf_u8;
mpc8xxx_spi->get_tx = mpc8xxx_spi_tx_buf_u8;
@@ -104,8 +104,8 @@ void mpc8xxx_spi_probe(struct device *dev, struct resource *mem,
mpc8xxx_spi->rx_shift = 0;
mpc8xxx_spi->tx_shift = 0;

- master->bus_num = pdata->bus_num;
- master->num_chipselect = pdata->max_chipselect;
+ ctlr->bus_num = pdata->bus_num;
+ ctlr->num_chipselect = pdata->max_chipselect;

init_completion(&mpc8xxx_spi->done);
}
--
2.43.0


2024-02-07 18:57:37

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH v3 24/32] staging: fbtft: Follow renaming of SPI "master" to "controller"

In commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"")
some functions and struct members were renamed. To not break all drivers
compatibility macros were provided.

To be able to remove these compatibility macros push the renaming into
this driver.

Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/staging/fbtft/fbtft-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 3626f429b002..68add4d598ae 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -794,7 +794,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
if (par->txbuf.buf && par->txbuf.len >= 1024)
sprintf(text1, ", %zu KiB buffer memory", par->txbuf.len >> 10);
if (spi)
- sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num,
+ sprintf(text2, ", spi%d.%d at %d MHz", spi->controller->bus_num,
spi_get_chipselect(spi, 0), spi->max_speed_hz / 1000000);
dev_info(fb_info->dev,
"%s frame buffer, %dx%d, %d KiB video memory%s, fps=%lu%s\n",
@@ -1215,7 +1215,7 @@ int fbtft_probe_common(struct fbtft_display *display,

/* 9-bit SPI setup */
if (par->spi && display->buswidth == 9) {
- if (par->spi->master->bits_per_word_mask & SPI_BPW_MASK(9)) {
+ if (par->spi->controller->bits_per_word_mask & SPI_BPW_MASK(9)) {
par->spi->bits_per_word = 9;
} else {
dev_warn(&par->spi->dev,
--
2.43.0


Subject: Re: [PATCH v3 00/32] spi: get rid of some legacy macros

Hello:

This patch was applied to chrome-platform/linux.git (for-kernelci)
by Mark Brown <[email protected]>:

On Wed, 7 Feb 2024 19:40:14 +0100 you wrote:
> Changes since v2
> (https://lore.kernel.org/linux-spi/[email protected]):
>
> - Drop patch "mtd: rawnand: fsl_elbc: Let .probe retry if local bus is
> missing" which doesn't belong into this series.
> - Fix a build failure noticed by the kernel build bot in
> drivers/spi/spi-au1550.c. (I failed to catch this because this driver
> is mips only, but not enabled in a mips allmodconfig. That's a bit
> unfortunate, but not easily fixable.)
> - Add the Reviewed-by: and Acked-by: tags I received for v2.
>
> [...]

Here is the summary with links:
- [v3,15/32] platform/chrome: cros_ec_spi: Follow renaming of SPI "master" to "controller"
https://git.kernel.org/chrome-platform/c/85ad0ec049a7

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html