All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>
To: "jic23@kernel.org" <jic23@kernel.org>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] iio: imu: adis: convert cs_change_delay to spi_delay struct
Date: Mon, 16 Sep 2019 06:58:08 +0000	[thread overview]
Message-ID: <4bf1afcd8c913cdf3b48b72cd74d5255a6413cf9.camel@analog.com> (raw)
In-Reply-To: <20190915111442.27e3c221@archlinux>

On Sun, 2019-09-15 at 11:14 +0100, Jonathan Cameron wrote:
> [External]
> 
> On Fri, 13 Sep 2019 14:55:49 +0300
> Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> 
> > The ADIS library is one of the few users of the new `cs_change_delay`
> > parameter for an spi_transfer.
> > 
> > The introduction of the `spi_delay` struct, requires that the users of of
> > `cs_change_delay` get an update. This change updates the ADIS library.
> > 
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> 
> Looks to me like the build is broken between patches 3 and 4.
> Don't do that as it breaks bisectability.
> 
> If you are changing an interface like this it has to occur in one patch,
> of you have to have intermediate code that deals with the smooth transition.
> 
> Otherwise, looks like a sensible bit of rework to me.

I thought about it, but wasn't sure.
Will create a v3 with patches 3 & 4 squashed.

Thanks
Alex

> 
> Jonathan
> 
> > ---
> >  drivers/iio/imu/adis.c | 24 ++++++++++++------------
> >  1 file changed, 12 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> > index 1631c255deab..2cd2cc2316c6 100644
> > --- a/drivers/iio/imu/adis.c
> > +++ b/drivers/iio/imu/adis.c
> > @@ -39,24 +39,24 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 2,
> >  			.bits_per_word = 8,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 4,
> >  			.bits_per_word = 8,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 6,
> >  			.bits_per_word = 8,
> > @@ -139,16 +139,16 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 2,
> >  			.bits_per_word = 8,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->read_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 4,
> >  			.rx_buf = adis->rx,
> > @@ -156,8 +156,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->read_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.rx_buf = adis->rx + 2,
> >  			.bits_per_word = 8,

      reply	other threads:[~2019-09-16  6:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 11:55 [PATCH v2 0/4] spi: introduce `struct spi_delay` data-type Alexandru Ardelean
2019-09-13 11:55 ` [PATCH v2 1/4] spi: move `cs_change_delay` backwards compat logic outside switch Alexandru Ardelean
2019-09-13 11:55 ` [PATCH v2 2/4] spi: introduce spi_delay struct as "value + unit" & spi_delay_exec() Alexandru Ardelean
2019-09-13 11:55 ` [PATCH v2 3/4] spi: make `cs_change_delay` the first user of the `spi_delay` logic Alexandru Ardelean
2019-09-13 11:55 ` [PATCH v2 4/4] iio: imu: adis: convert cs_change_delay to spi_delay struct Alexandru Ardelean
2019-09-15 10:14   ` Jonathan Cameron
2019-09-16  6:58     ` Ardelean, Alexandru [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=4bf1afcd8c913cdf3b48b72cd74d5255a6413cf9.camel@analog.com \
    --to=alexandru.ardelean@analog.com \
    --cc=broonie@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.