linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Baruch Siach <baruch@tkos.co.il>
Cc: linux-spi@vger.kernel.org, Fabio Estevam <festevam@gmail.com>,
	Marek Vasut <marex@denx.de>,
	kernel@pengutronix.de, linux-imx@nxp.com,
	Mark Brown <broonie@kernel.org>, David Jander <david@protonic.nl>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 7/9] spi: spi-imx: replace struct spi_imx_data::bitbang by pointer to struct spi_controller
Date: Mon, 2 May 2022 19:33:01 +0200	[thread overview]
Message-ID: <20220502173301.ghgxu2wfg346zqrc@pengutronix.de> (raw)
In-Reply-To: <87a6bzyhky.fsf@tarshish>

[-- Attachment #1: Type: text/plain, Size: 2639 bytes --]

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

-- 
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-05-02 17:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 16:52 [RFC 0/9] spi: spi-imx: cleanups and performance improvements Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 1/9] spi: spi-imx: fix sparse warning: add identifier name to function definition Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 2/9] spi: spi-imx: avoid unnecessary line continuations Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 3/9] spi: spi-imx: mx51_ecspi_intctrl(): prefer 'unsigned int' to bare use of 'unsigned' Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 4/9] spi: spi-imx: spi_imx_buf_rx_swap_u32(): fix sparse warning Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 5/9] spi: spi-imx: spi_imx_buf_rx_swap_u32(): replace open coded swahw32() Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 6/9] spi: spi-imx: complete conversion from master -> controller Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 7/9] spi: spi-imx: replace struct spi_imx_data::bitbang by pointer to struct spi_controller Marc Kleine-Budde
2022-05-02 17:14   ` Baruch Siach
2022-05-02 17:33     ` Marc Kleine-Budde [this message]
2022-05-02 16:52 ` [RFC 8/9] spi: spi-imx: add PIO polling support Marc Kleine-Budde
2022-05-02 16:52 ` [RFC 9/9] spi: spi-imx: mx51_ecspi_prepare_message(): skip writing MX51_ECSPI_CONFIG register if unchanged Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220502173301.ghgxu2wfg346zqrc@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=baruch@tkos.co.il \
    --cc=broonie@kernel.org \
    --cc=david@protonic.nl \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-spi@vger.kernel.org \
    --cc=marex@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).