2023-10-23 12:36:54

by Gradinariu, Ramona

[permalink] [raw]
Subject: [PATCH 0/3] iio: imu: adis: Use spi cs inactive delay

A delay is needed each time the chip selected becomes inactive,
even after burst data readings are performed.
Currently, there is no delay added after a burst reading
and in case a new SPI transfer is performed before
the needed delay, the adis device becomes unresponsive until
reset.

First patch adds the spi cs inactive delay in case it is not set and removes
the additional chip select change delay present in adis APIs (to avoid a
double delay).
Second and third patch updates dt-bindings for the drivers which are affected
by the first patch.

Ramona Gradinariu (3):
iio: imu: adis: Use spi cs inactive delay
dt-bindings: adis16475: Add 'spi-cs-inactive-delay-ns' property
dt-bindings: adis16460: Add 'spi-cs-inactive-delay-ns' property

.../bindings/iio/imu/adi,adis16460.yaml | 5 +++++
.../bindings/iio/imu/adi,adis16475.yaml | 5 +++++
drivers/iio/imu/adis.c | 18 ++++++------------
3 files changed, 16 insertions(+), 12 deletions(-)

--
2.34.1


2023-10-23 12:36:55

by Gradinariu, Ramona

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: adis16475: Add 'spi-cs-inactive-delay-ns' property

Add 'spi-cs-inactive-delay-ns' property.

Signed-off-by: Ramona Gradinariu <[email protected]>
---
Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml b/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
index c73533c54588..f01bf0ada0e8 100644
--- a/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
@@ -47,6 +47,11 @@ properties:
spi-max-frequency:
maximum: 2000000

+ spi-cs-inactive-delay-ns:
+ minimum: 16000
+ description:
+ If not explicitly set in the device tree, the driver will set it to 16us.
+
interrupts:
maxItems: 1

--
2.34.1

2023-10-23 13:24:47

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: adis16475: Add 'spi-cs-inactive-delay-ns' property

On 23/10/2023 14:35, Ramona Gradinariu wrote:
> Add 'spi-cs-inactive-delay-ns' property.
>
> Signed-off-by: Ramona Gradinariu <[email protected]>
> ---
> Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml b/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
> index c73533c54588..f01bf0ada0e8 100644
> --- a/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
> +++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
> @@ -47,6 +47,11 @@ properties:
> spi-max-frequency:
> maximum: 2000000
>
> + spi-cs-inactive-delay-ns:
> + minimum: 16000
> + description:
> + If not explicitly set in the device tree, the driver will set it to 16us.

Drop description, it's redundant/useless. Instead:

default: 16000



Best regards,
Krzysztof