[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190915111442.27e3c221@archlinux>
Date: Sun, 15 Sep 2019 11:14:42 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Alexandru Ardelean <alexandru.ardelean@...log.com>
Cc: <linux-iio@...r.kernel.org>, <linux-spi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <broonie@...nel.org>
Subject: Re: [PATCH v2 4/4] iio: imu: adis: convert cs_change_delay to
spi_delay struct
On Fri, 13 Sep 2019 14:55:49 +0300
Alexandru Ardelean <alexandru.ardelean@...log.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@...log.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.
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,
Powered by blists - more mailing lists