iio: imu: adis: Use spi cs inactive delay
authorRamona Gradinariu <ramona.gradinariu@analog.com>
Fri, 27 Oct 2023 14:03:56 +0000 (17:03 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 16 Nov 2023 19:10:28 +0000 (19:10 +0000)
commit9405e968cfde48aecc90ff04611dab620167e1ed
treec95dbf2aad9bb13c03f2fa6d15f414a810f59508
parentc788b9e56acd46f3a07d0fad6fc3f543c3557d2c
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.

This commit is adding the needed delay directly to the spi driver,
using the cs_inactive parameter, in case it is not set and is
removing the additional chip select change delay present in adis
APIs to remove the double delay.

Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com>
Link: https://lore.kernel.org/r/20231027140358.328699-2-ramona.gradinariu@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis.c