Lars-Peter Clausen
d7c773412f
iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion
...
[ Upstream commit df1d80aee9 ]
For devices from the SigmaDelta family we need to keep CS low when doing a
conversion, since the device will use the MISO line as a interrupt to
indicate that the conversion is complete.
This is why the driver locks the SPI bus and when the SPI bus is locked
keeps as long as a conversion is going on. The current implementation gets
one small detail wrong though. CS is only de-asserted after the SPI bus is
unlocked. This means it is possible for a different SPI device on the same
bus to send a message which would be wrongfully be addressed to the
SigmaDelta device as well. Make sure that the last SPI transfer that is
done while holding the SPI bus lock de-asserts the CS signal.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de >
Signed-off-by: Alexandru Ardelean <Alexandru.Ardelean@analog.com >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2019-05-31 06:46:24 -07:00
..
2019-01-22 21:40:33 +01:00
2018-12-01 09:37:29 +01:00
2019-03-27 14:14:39 +09:00
2019-02-12 19:46:57 +01:00
2019-05-31 06:46:24 -07:00
2019-03-13 14:02:35 -07:00
2019-05-22 07:37:41 +02:00
2019-04-17 08:38:42 +02:00
2019-02-20 10:25:46 +01:00
2018-11-27 16:13:05 +01:00
2019-04-17 08:38:46 +02:00
2019-05-08 07:21:54 +02:00
2019-02-27 10:08:52 +01:00
2019-05-04 09:20:22 +02:00
2019-02-15 08:10:13 +01:00
2019-01-26 09:32:34 +01:00
2019-04-20 09:16:05 +02:00
2019-03-05 17:58:50 +01:00
2019-05-31 06:46:00 -07:00
2019-04-17 08:38:51 +02:00
2019-01-31 08:14:41 +01:00
2019-05-25 18:23:48 +02:00
2019-05-31 06:46:19 -07:00
2019-04-05 22:33:13 +02:00
2019-04-05 22:33:03 +02:00
2019-02-27 10:08:53 +01:00
2019-02-27 10:08:53 +01:00
2019-02-27 10:08:53 +01:00
2019-04-20 09:16:02 +02:00
2019-05-14 19:17:59 +02:00
2019-03-10 07:17:15 +01:00
2019-05-25 18:23:26 +02:00
2019-03-23 20:10:09 +01:00
2019-04-03 06:26:30 +02:00
2019-05-16 19:41:22 +02:00
2019-05-16 19:41:17 +02:00
2019-04-05 22:32:59 +02:00
2019-05-31 06:46:12 -07:00
2019-05-08 07:21:51 +02:00
2018-12-17 09:24:38 +01:00
2018-12-01 09:37:31 +01:00
2018-12-05 19:32:10 +01:00
2019-05-31 06:46:18 -07:00
2019-02-12 19:47:14 +01:00
2019-03-23 20:10:08 +01:00
2018-11-13 11:08:54 -08:00
2019-02-12 19:47:24 +01:00
2018-12-05 19:32:13 +01:00
2019-01-13 09:51:04 +01:00
2019-05-22 07:37:40 +02:00
2019-05-22 07:37:40 +02:00
2019-01-31 08:14:36 +01:00
2019-05-08 07:21:43 +02:00
2018-11-21 09:19:20 +01:00
2019-03-05 17:58:51 +01:00
2019-03-05 17:58:45 +01:00
2019-04-05 22:33:09 +02:00
2019-05-22 07:37:44 +02:00
2019-04-20 09:15:59 +02:00
2019-05-10 17:54:08 +02:00
2019-03-23 20:09:48 +01:00
2019-04-27 09:36:37 +02:00
2019-05-16 19:41:22 +02:00
2018-12-29 13:37:59 +01:00
2019-04-17 08:38:51 +02:00
2019-01-13 09:51:04 +01:00
2019-05-04 09:20:11 +02:00
2019-01-16 22:04:29 +01:00
2019-05-31 06:46:05 -07:00
2019-01-09 17:38:42 +01:00
2018-12-05 19:31:59 +01:00
2019-02-23 09:07:25 +01:00
2019-04-27 09:36:30 +02:00
2018-11-21 09:19:20 +01:00
2019-05-25 18:23:26 +02:00
2019-05-25 18:23:38 +02:00
2019-04-05 22:33:11 +02:00
2018-12-01 09:37:34 +01:00
2019-05-04 09:20:11 +02:00
2019-03-23 20:10:04 +01:00
2018-12-17 09:24:39 +01:00
2019-01-09 17:38:33 +01:00
2018-12-05 19:32:03 +01:00
2019-04-05 22:32:56 +02:00
2019-04-05 22:32:56 +02:00
2019-04-05 22:33:12 +02:00
2019-05-25 18:23:20 +02:00
2019-04-03 06:26:28 +02:00
2019-05-31 06:46:16 -07:00
2019-03-13 14:02:35 -07:00
2019-04-17 08:38:45 +02:00
2019-04-20 09:16:05 +02:00
2018-12-29 13:37:55 +01:00
2018-11-13 11:08:51 -08:00
2018-12-05 19:32:00 +01:00
2018-12-08 12:59:07 +01:00
2018-12-13 09:16:15 +01:00
2019-05-08 07:21:44 +02:00
2019-02-27 10:09:01 +01:00
2019-04-17 08:38:52 +02:00