Re: [RFC 7/9] spi: spi-imx: replace struct spi_imx_data::bitbang by pointer to struct spi_controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> > Signed-off-by: David Jander <david@xxxxxxxxxxx>
> > Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> 
> [...]
> 
> > @@ -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

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux