Re: [PATCH v2 13/15] spi: Rename SPI_MASTER_GPIO_SS to SPI_CONTROLLER_GPIO_SS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH v2 13/15] spi: Rename SPI_MASTER_GPIO_SS to SPI_CONTROLLER_GPIO_SS
- From: Serge Semin <fancer.lancer@xxxxxxxxx>
- Date: Tue, 11 Jul 2023 15:30:19 +0300
- Cc: Mark Brown <broonie@xxxxxxxxxx>, Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>, Yang Yingliang <yangyingliang@xxxxxxxxxx>, Amit Kumar Mahapatra via Alsa-devel <alsa-devel@xxxxxxxxxxxxxxxx>, Neil Armstrong <neil.armstrong@xxxxxxxxxx>, Tharun Kumar P <tharunkumar.pasumarthi@xxxxxxxxxxxxx>, Vijaya Krishna Nivarthi <quic_vnivarth@xxxxxxxxxxx>, Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>, linux-spi@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-amlogic@xxxxxxxxxxxxxxxxxxx, linux-mediatek@xxxxxxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, Sanjay R Mehta <sanju.mehta@xxxxxxx>, Radu Pirea <radu_nicolae.pirea@xxxxxx>, Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>, Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, NXP Linux Team <linux-imx@xxxxxxx>, Kevin Hilman <khilman@xxxxxxxxxxxx>, Jerome Brunet <jbrunet@xxxxxxxxxxxx>, Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>, Matthias Brugger <matthias.bgg@xxxxxxxxx>, AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>, Andy Gross <agross@xxxxxxxxxx>, Bjorn Andersson <andersson@xxxxxxxxxx>, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Orson Zhai <orsonzhai@xxxxxxxxx>, Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>, Chunyan Zhang <zhang.lyra@xxxxxxxxx>, Alain Volmat <alain.volmat@xxxxxxxxxxx>, Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>, Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Richard Cochran <richardcochran@xxxxxxxxx>
- In-reply-to: <20230710154932.68377-14-andriy.shevchenko@linux.intel.com>
- References: <20230710154932.68377-1-andriy.shevchenko@linux.intel.com> <20230710154932.68377-14-andriy.shevchenko@linux.intel.com>
On Mon, Jul 10, 2023 at 06:49:30PM +0300, Andy Shevchenko wrote:
> Rename SPI_MASTER_GPIO_SS to SPI_CONTROLLER_GPIO_SS and
> convert the users to SPI_CONTROLLER_GPIO_SS to follow
* I'm not an expert in English, but imo the next would look a
* bit more readable:
* convert s/the users to SPI_CONTROLLER_GPIO_SS/the code to using SPI_CONTROLLER_GPIO_SS
> the new naming shema.
s/shema/schema
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
[...]
> drivers/spi/spi-dw-core.c | 2 +-
[...]
> diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c
> index a8ba41ad4541..45f5acc26b1d 100644
> --- a/drivers/spi/spi-dw-core.c
> +++ b/drivers/spi/spi-dw-core.c
> @@ -932,7 +932,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
> if (dws->mem_ops.exec_op)
> master->mem_ops = &dws->mem_ops;
> master->max_speed_hz = dws->max_freq;
> - master->flags = SPI_MASTER_GPIO_SS;
> + master->flags = SPI_CONTROLLER_GPIO_SS;
> master->auto_runtime_pm = true;
>
> /* Get default rx sample delay */
For the DW APB/AHB SSI driver:
Reviewed-by: Serge Semin <fancer.lancer@xxxxxxxxx>
-Serge(y)
[...]
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 06a92a3a5746..bcabae98cb7c 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -995,7 +995,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force)
> gpiod_set_value_cansleep(spi_get_csgpiod(spi, 0), activate);
> }
> /* Some SPI masters need both GPIO CS & slave_select */
> - if ((spi->controller->flags & SPI_MASTER_GPIO_SS) &&
> + if ((spi->controller->flags & SPI_CONTROLLER_GPIO_SS) &&
> spi->controller->set_cs)
> spi->controller->set_cs(spi, !enable);
> } else if (spi->controller->set_cs) {
> @@ -3020,7 +3020,7 @@ static int spi_get_gpio_descs(struct spi_controller *ctlr)
>
> ctlr->unused_native_cs = ffs(~native_cs_mask) - 1;
>
> - if ((ctlr->flags & SPI_MASTER_GPIO_SS) && num_cs_gpios &&
> + if ((ctlr->flags & SPI_CONTROLLER_GPIO_SS) && num_cs_gpios &&
> ctlr->max_native_cs && ctlr->unused_native_cs >= ctlr->max_native_cs) {
> dev_err(dev, "No unused native chip select available\n");
> return -EINVAL;
> diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
> index cdc3addfe117..43f6c3f71a76 100644
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -578,8 +578,7 @@ struct spi_controller {
> #define SPI_CONTROLLER_NO_TX BIT(2) /* Can't do buffer write */
> #define SPI_CONTROLLER_MUST_RX BIT(3) /* Requires rx */
> #define SPI_CONTROLLER_MUST_TX BIT(4) /* Requires tx */
> -
> -#define SPI_MASTER_GPIO_SS BIT(5) /* GPIO CS must select slave */
> +#define SPI_CONTROLLER_GPIO_SS BIT(5) /* GPIO CS must select slave */
>
> /* Flag indicating if the allocation of this struct is devres-managed */
> bool devm_allocated;
> --
> 2.40.0.1.gaa8946217a0b
>
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|