summaryrefslogtreecommitdiff
path: root/include/linux/syscalls_api.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2022-03-22 12:50:27 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-04-04 09:11:25 +0100
commit8bea9af887de4c99a95f93f2ce400ef63e8b4e9b (patch)
treef40f33fb75d920f48d8f0996dfceb28ab5030ed3 /include/linux/syscalls_api.h
parentfe7d929a63c3a0b7908ae5d7b9fdf456acd66a43 (diff)
iio: adc: ad_sigma_delta: Add sequencer support
Some sigma-delta chips support sampling of multiple channels in continuous mode. When the operating with more than one channel enabled, the channel sequencer cycles through the enabled channels in sequential order, from first channel to the last one. If a channel is disabled, it is skipped by the sequencer. If more than one channel is used in continuous mode, instruct the device to append the status to the SPI transfer (1 extra byte) every time we receive a sample. All sigma-delta chips possessing a sampling sequencer have this ability. Inside the status register there will be the number of the converted channel. In this way, even if the CPU won't keep up with the sampling rate, it won't send to userspace wrong channel samples. When multiple channels are enabled in continuous mode, the device needs to perform a measurement on all slots before we can push to userspace the sample. If, during sequencing and data reading, a channel measurement is lost, a desync occurred. In this case, ad_sigma_delta drops the incomplete sample and waits for the device to send the measurement on the first active slot. Co-developed-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20220322105029.86389-5-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/syscalls_api.h')
0 files changed, 0 insertions, 0 deletions