* [PATCH] iio: imu: adis: use new `delay` structure for SPI transfer delays
@ 2019-12-04 8:09 Alexandru Ardelean
2019-12-07 11:05 ` Jonathan Cameron
2019-12-10 14:07 ` [PATCH v2] " Alexandru Ardelean
0 siblings, 2 replies; 5+ messages in thread
From: Alexandru Ardelean @ 2019-12-04 8:09 UTC (permalink / raw)
To: linux-iio, linux-kernel; +Cc: jic23, Alexandru Ardelean
In a recent change to the SPI subsystem [1], a new `delay` struct was added
to replace the `delay_usecs`. This change replaces the current `delay_secs`
with `delay` for this driver.
The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
that both `delay_usecs` & `delay` are used (in this order to preserve
backwards compatibility).
[1] commit bebcfd272df6485 ("spi: introduce `delay` field for
`spi_transfer` + spi_transfer_delay_exec()")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
drivers/iio/imu/adis.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
index 2cd2cc2316c6..95af67470668 100644
--- a/drivers/iio/imu/adis.c
+++ b/drivers/iio/imu/adis.c
@@ -38,7 +38,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -46,7 +47,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -54,19 +56,22 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .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,
.len = 2,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.tx_buf = adis->tx + 8,
.bits_per_word = 8,
.len = 2,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
},
};
@@ -138,7 +143,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -146,7 +152,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->read_delay,
+ .delay.value = adis->data->read_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -155,14 +162,16 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->read_delay,
+ .delay.value = adis->data->read_delay,
+ .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,
.len = 2,
- .delay_usecs = adis->data->read_delay,
+ .delay.value = adis->data->read_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
},
};
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iio: imu: adis: use new `delay` structure for SPI transfer delays
2019-12-04 8:09 [PATCH] iio: imu: adis: use new `delay` structure for SPI transfer delays Alexandru Ardelean
@ 2019-12-07 11:05 ` Jonathan Cameron
2019-12-10 14:07 ` Ardelean, Alexandru
2019-12-10 14:07 ` [PATCH v2] " Alexandru Ardelean
1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2019-12-07 11:05 UTC (permalink / raw)
To: Alexandru Ardelean; +Cc: linux-iio, linux-kernel
On Wed, 4 Dec 2019 10:09:04 +0200
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> In a recent change to the SPI subsystem [1], a new `delay` struct was added
> to replace the `delay_usecs`. This change replaces the current `delay_secs`
> with `delay` for this driver.
>
> The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
> that both `delay_usecs` & `delay` are used (in this order to preserve
> backwards compatibility).
>
> [1] commit bebcfd272df6485 ("spi: introduce `delay` field for
> `spi_transfer` + spi_transfer_delay_exec()")
>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
I don't yet have that patch in my upstream so this will have to wait until
it gets there. Give me a poke if I seem to have forgotten about it.
Thanks,
Jonathan
> ---
> drivers/iio/imu/adis.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> index 2cd2cc2316c6..95af67470668 100644
> --- a/drivers/iio/imu/adis.c
> +++ b/drivers/iio/imu/adis.c
> @@ -38,7 +38,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -46,7 +47,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -54,19 +56,22 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .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,
> .len = 2,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> .tx_buf = adis->tx + 8,
> .bits_per_word = 8,
> .len = 2,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> },
> };
>
> @@ -138,7 +143,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -146,7 +152,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->read_delay,
> + .delay.value = adis->data->read_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -155,14 +162,16 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->read_delay,
> + .delay.value = adis->data->read_delay,
> + .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,
> .len = 2,
> - .delay_usecs = adis->data->read_delay,
> + .delay.value = adis->data->read_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> },
> };
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iio: imu: adis: use new `delay` structure for SPI transfer delays
2019-12-07 11:05 ` Jonathan Cameron
@ 2019-12-10 14:07 ` Ardelean, Alexandru
0 siblings, 0 replies; 5+ messages in thread
From: Ardelean, Alexandru @ 2019-12-10 14:07 UTC (permalink / raw)
To: jic23; +Cc: linux-kernel, linux-iio
On Sat, 2019-12-07 at 11:05 +0000, Jonathan Cameron wrote:
> On Wed, 4 Dec 2019 10:09:04 +0200
> Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
>
> > In a recent change to the SPI subsystem [1], a new `delay` struct was
> > added
> > to replace the `delay_usecs`. This change replaces the current
> > `delay_secs`
> > with `delay` for this driver.
> >
> > The `spi_transfer_delay_exec()` function [in the SPI framework] makes
> > sure
> > that both `delay_usecs` & `delay` are used (in this order to preserve
> > backwards compatibility).
> >
> > [1] commit bebcfd272df6485 ("spi: introduce `delay` field for
> > `spi_transfer` + spi_transfer_delay_exec()")
> >
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> I don't yet have that patch in my upstream so this will have to wait
> until
> it gets there. Give me a poke if I seem to have forgotten about it.
Ack.
Will send a V2 with a typo fix in the commit-desc in the meantime.
>
> Thanks,
>
> Jonathan
>
>
> > ---
> > drivers/iio/imu/adis.c | 27 ++++++++++++++++++---------
> > 1 file changed, 18 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> > index 2cd2cc2316c6..95af67470668 100644
> > --- a/drivers/iio/imu/adis.c
> > +++ b/drivers/iio/imu/adis.c
> > @@ -38,7 +38,8 @@ int adis_write_reg(struct adis *adis, unsigned int
> > reg,
> > .bits_per_word = 8,
> > .len = 2,
> > .cs_change = 1,
> > - .delay_usecs = adis->data->write_delay,
> > + .delay.value = adis->data->write_delay,
> > + .delay.unit = SPI_DELAY_UNIT_USECS,
> > .cs_change_delay.value = adis->data-
> > >cs_change_delay,
> > .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> > }, {
> > @@ -46,7 +47,8 @@ int adis_write_reg(struct adis *adis, unsigned int
> > reg,
> > .bits_per_word = 8,
> > .len = 2,
> > .cs_change = 1,
> > - .delay_usecs = adis->data->write_delay,
> > + .delay.value = adis->data->write_delay,
> > + .delay.unit = SPI_DELAY_UNIT_USECS,
> > .cs_change_delay.value = adis->data-
> > >cs_change_delay,
> > .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> > }, {
> > @@ -54,19 +56,22 @@ int adis_write_reg(struct adis *adis, unsigned int
> > reg,
> > .bits_per_word = 8,
> > .len = 2,
> > .cs_change = 1,
> > - .delay_usecs = adis->data->write_delay,
> > + .delay.value = adis->data->write_delay,
> > + .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,
> > .len = 2,
> > - .delay_usecs = adis->data->write_delay,
> > + .delay.value = adis->data->write_delay,
> > + .delay.unit = SPI_DELAY_UNIT_USECS,
> > }, {
> > .tx_buf = adis->tx + 8,
> > .bits_per_word = 8,
> > .len = 2,
> > - .delay_usecs = adis->data->write_delay,
> > + .delay.value = adis->data->write_delay,
> > + .delay.unit = SPI_DELAY_UNIT_USECS,
> > },
> > };
> >
> > @@ -138,7 +143,8 @@ int adis_read_reg(struct adis *adis, unsigned int
> > reg,
> > .bits_per_word = 8,
> > .len = 2,
> > .cs_change = 1,
> > - .delay_usecs = adis->data->write_delay,
> > + .delay.value = adis->data->write_delay,
> > + .delay.unit = SPI_DELAY_UNIT_USECS,
> > .cs_change_delay.value = adis->data-
> > >cs_change_delay,
> > .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> > }, {
> > @@ -146,7 +152,8 @@ int adis_read_reg(struct adis *adis, unsigned int
> > reg,
> > .bits_per_word = 8,
> > .len = 2,
> > .cs_change = 1,
> > - .delay_usecs = adis->data->read_delay,
> > + .delay.value = adis->data->read_delay,
> > + .delay.unit = SPI_DELAY_UNIT_USECS,
> > .cs_change_delay.value = adis->data-
> > >cs_change_delay,
> > .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> > }, {
> > @@ -155,14 +162,16 @@ int adis_read_reg(struct adis *adis, unsigned int
> > reg,
> > .bits_per_word = 8,
> > .len = 2,
> > .cs_change = 1,
> > - .delay_usecs = adis->data->read_delay,
> > + .delay.value = adis->data->read_delay,
> > + .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,
> > .len = 2,
> > - .delay_usecs = adis->data->read_delay,
> > + .delay.value = adis->data->read_delay,
> > + .delay.unit = SPI_DELAY_UNIT_USECS,
> > },
> > };
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] iio: imu: adis: use new `delay` structure for SPI transfer delays
2019-12-04 8:09 [PATCH] iio: imu: adis: use new `delay` structure for SPI transfer delays Alexandru Ardelean
2019-12-07 11:05 ` Jonathan Cameron
@ 2019-12-10 14:07 ` Alexandru Ardelean
2020-01-13 22:04 ` Jonathan Cameron
1 sibling, 1 reply; 5+ messages in thread
From: Alexandru Ardelean @ 2019-12-10 14:07 UTC (permalink / raw)
To: linux-iio, linux-kernel; +Cc: jic23, Alexandru Ardelean
In a recent change to the SPI subsystem [1], a new `delay` struct was added
to replace the `delay_usecs`. This change replaces the current `delay_usecs`
with `delay` for this driver.
The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
that both `delay_usecs` & `delay` are used (in this order to preserve
backwards compatibility).
[1] commit bebcfd272df6485 ("spi: introduce `delay` field for
`spi_transfer` + spi_transfer_delay_exec()")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
Changelog v1 -> v2:
* fixed typo in commit desc `delay_secs` -> `delay_usecs`
drivers/iio/imu/adis.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
index e14c8536fd09..3cc57ef22b2e 100644
--- a/drivers/iio/imu/adis.c
+++ b/drivers/iio/imu/adis.c
@@ -38,7 +38,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -46,7 +47,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -54,19 +56,22 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .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,
.len = 2,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.tx_buf = adis->tx + 8,
.bits_per_word = 8,
.len = 2,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
},
};
@@ -138,7 +143,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->write_delay,
+ .delay.value = adis->data->write_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -146,7 +152,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->read_delay,
+ .delay.value = adis->data->read_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
.cs_change_delay.value = adis->data->cs_change_delay,
.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
}, {
@@ -155,14 +162,16 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
.bits_per_word = 8,
.len = 2,
.cs_change = 1,
- .delay_usecs = adis->data->read_delay,
+ .delay.value = adis->data->read_delay,
+ .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,
.len = 2,
- .delay_usecs = adis->data->read_delay,
+ .delay.value = adis->data->read_delay,
+ .delay.unit = SPI_DELAY_UNIT_USECS,
},
};
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] iio: imu: adis: use new `delay` structure for SPI transfer delays
2019-12-10 14:07 ` [PATCH v2] " Alexandru Ardelean
@ 2020-01-13 22:04 ` Jonathan Cameron
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2020-01-13 22:04 UTC (permalink / raw)
To: Alexandru Ardelean; +Cc: linux-iio, linux-kernel
On Tue, 10 Dec 2019 16:07:55 +0200
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> In a recent change to the SPI subsystem [1], a new `delay` struct was added
> to replace the `delay_usecs`. This change replaces the current `delay_usecs`
> with `delay` for this driver.
>
> The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
> that both `delay_usecs` & `delay` are used (in this order to preserve
> backwards compatibility).
>
> [1] commit bebcfd272df6485 ("spi: introduce `delay` field for
> `spi_transfer` + spi_transfer_delay_exec()")
>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Applied to the togreg branch of iio.git and pushed out as testing
for all the normal reasons.
Thanks,
Jonathan
> ---
>
> Changelog v1 -> v2:
> * fixed typo in commit desc `delay_secs` -> `delay_usecs`
>
> drivers/iio/imu/adis.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> index e14c8536fd09..3cc57ef22b2e 100644
> --- a/drivers/iio/imu/adis.c
> +++ b/drivers/iio/imu/adis.c
> @@ -38,7 +38,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -46,7 +47,8 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -54,19 +56,22 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .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,
> .len = 2,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> .tx_buf = adis->tx + 8,
> .bits_per_word = 8,
> .len = 2,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> },
> };
>
> @@ -138,7 +143,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->write_delay,
> + .delay.value = adis->data->write_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -146,7 +152,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->read_delay,
> + .delay.value = adis->data->read_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> .cs_change_delay.value = adis->data->cs_change_delay,
> .cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> }, {
> @@ -155,14 +162,16 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> .bits_per_word = 8,
> .len = 2,
> .cs_change = 1,
> - .delay_usecs = adis->data->read_delay,
> + .delay.value = adis->data->read_delay,
> + .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,
> .len = 2,
> - .delay_usecs = adis->data->read_delay,
> + .delay.value = adis->data->read_delay,
> + .delay.unit = SPI_DELAY_UNIT_USECS,
> },
> };
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-13 22:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 8:09 [PATCH] iio: imu: adis: use new `delay` structure for SPI transfer delays Alexandru Ardelean
2019-12-07 11:05 ` Jonathan Cameron
2019-12-10 14:07 ` Ardelean, Alexandru
2019-12-10 14:07 ` [PATCH v2] " Alexandru Ardelean
2020-01-13 22:04 ` Jonathan Cameron
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).