linux-stable/include/linux/iio
Lars-Peter Clausen 50892cb292 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:47:29 -07:00
..
accel
adc iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion 2019-05-31 06:47:29 -07:00
common iio: st_sensors: add register mask for status register 2017-12-25 14:26:26 +01:00
dac License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
frequency
gyro
imu
magnetometer License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
timer iio: stm32: fix adc/trigger link error 2017-12-14 09:52:48 +01:00
buffer-dma.h iio: buffer: fix the function signature to match implementation 2018-11-04 14:52:45 +01:00
buffer-dmaengine.h
buffer.h
buffer_impl.h iio:buffer: make length types match kfifo types 2018-06-05 11:41:58 +02:00
configfs.h
consumer.h iio: inkern: api for manipulating ext_info of iio channels 2017-06-03 19:29:26 +09:00
driver.h
events.h
iio.h PATCH] iio: Fix some documentation warnings 2017-08-20 15:21:46 +01:00
kfifo_buf.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
machine.h
sw_device.h iio: sw-device: Fix config group initialization 2017-03-13 20:42:34 +00:00
sw_trigger.h
sysfs.h
trigger.h PATCH] iio: Fix some documentation warnings 2017-08-20 15:21:46 +01:00
trigger_consumer.h
triggered_buffer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
triggered_event.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
types.h