Message ID | 20220502165210.1956397-1-mkl@pengutronix.de |
---|---|
Headers | show |
Series | spi: spi-imx: cleanups and performance improvements | expand |
On 02.05.2022 20:14:28, Baruch Siach wrote: > Hi Marc, > > On Mon, May 02 2022, Marc Kleine-Budde wrote: > > > There's no need to embed the struct spi_bitbang into our private > > data (struct spi_imx_data), the spi core is flexible enough, so that > > we only need a pointer to the allocated struct spi_controller. > > > > This is also a preparation patch to add PIO based polling support to > > the driver. > > > > Co-developed-by: David Jander <david@protonic.nl> > > Signed-off-by: David Jander <david@protonic.nl> > > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > > [...] > > > @@ -1641,17 +1642,17 @@ static int spi_imx_probe(struct platform_device *pdev) > > else > > controller->num_chipselect = 3; > > > > - spi_imx->bitbang.setup_transfer = spi_imx_setupxfer; > > - spi_imx->bitbang.txrx_bufs = spi_imx_transfer; > > - spi_imx->bitbang.master->setup = spi_imx_setup; > > - spi_imx->bitbang.master->cleanup = spi_imx_cleanup; > > - spi_imx->bitbang.master->prepare_message = spi_imx_prepare_message; > > - spi_imx->bitbang.master->unprepare_message = spi_imx_unprepare_message; > > - spi_imx->bitbang.master->slave_abort = spi_imx_slave_abort; > > - spi_imx->bitbang.master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_NO_CS; > > + spi_imx->controller->transfer_one = spi_imx_transfer_one; > > + spi_imx->controller->setup = spi_imx_setup; > > + spi_imx->controller->cleanup = spi_imx_cleanup; > > + spi_imx->controller->prepare_message = spi_imx_prepare_message; > > + spi_imx->controller->unprepare_message = spi_imx_unprepare_message; > > + spi_imx->controller->slave_abort = spi_imx_slave_abort; > > + spi_imx->controller->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_NO_CS; > > + > > if (is_imx35_cspi(spi_imx) || is_imx51_ecspi(spi_imx) || > > is_imx53_ecspi(spi_imx)) > > - spi_imx->bitbang.master->mode_bits |= SPI_LOOP | SPI_READY; > > + spi_imx->controller->mode_bits |= SPI_LOOP | SPI_READY; > > > > if (is_imx51_ecspi(spi_imx) && > > device_property_read_u32(&pdev->dev, "cs-gpios", NULL)) > > This hunk conflicts with commit 79422ed9bd7f ("spi: spi-imx: add support > for SPI_RX_CPHA_FLIP") in Mark's for-5.19 branch. That commit also adds > another reference to bitbang.master. Will rebase to broonie/spi.git for-5.19. Thanks, Marc