mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: bo@mboxify.com
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/1] spi: convert transfer delay to new spi_delay struct
Date: Mon, 30 Jun 2025 16:38:40 +0800	[thread overview]
Message-ID: <f065da663548c14a49e3fe33850c663c@mboxify.com> (raw)
In-Reply-To: <aGJF8Ta5BPke9Rqz@pengutronix.de>

On 2025-06-30 16:08, Sascha Hauer wrote:
> 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@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.

Thanks, and sorry for the oversight.

Bo

> 
> Sascha



      reply	other threads:[~2025-06-30  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-27 12:28 [PATCH 0/1] " Bo Sun
2025-06-27 12:28 ` [PATCH 1/1] " Bo Sun
2025-06-30  8:06   ` Sascha Hauer
2025-06-30  8:08   ` Sascha Hauer
2025-06-30  8:38     ` bo [this message]

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=f065da663548c14a49e3fe33850c663c@mboxify.com \
    --to=bo@mboxify.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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