[PATCH 1/1] spi: convert transfer delay to new spi_delay struct
Sascha Hauer
s.hauer at pengutronix.de
Mon Jun 30 01:08:17 PDT 2025
Hi,
On Fri, Jun 27, 2025 at 08:28:11PM +0800, Bo Sun wrote:
> Replace the deprecated delay_usecs field with the new spi_delay struct
> in spi_transfer structure. Update spi_transfer_one_message to use
> spi_delay_exec and the mc13xxx driver to use the new structure.
>
> Signed-off-by: Bo Sun <bo at mboxify.com>
> ---
> drivers/mfd/mc13xxx.c | 5 ++++-
> drivers/spi/spi.c | 4 +---
> include/spi/spi.h | 8 ++++----
> 3 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
> index 288bd407ff..393f163671 100644
> --- a/drivers/mfd/mc13xxx.c
> +++ b/drivers/mfd/mc13xxx.c
> @@ -84,7 +84,10 @@ static int spi_rw(struct spi_device *spi, void * buf, size_t len)
> .rx_buf = buf,
> .len = len,
> .cs_change = 0,
> - .delay_usecs = 0,
It's initialized to 0, so
if (xfer->delay_usecs)
udelay(xfer->delay_usecs);
will do just nothing.
> + .delay = {
> + .value = 0,
> + .unit = SPI_DELAY_UNIT_USECS,
> + },
I just dropped this and adjusted the commit message accordingly.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list