diff options
author | Eugen Hristev <eugen.hristev@microchip.com> | 2020-01-28 12:57:41 +0000 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-04-25 15:52:35 +0100 |
commit | abb7e84d29b0d9fc9410661aceffecb5e22ad006 (patch) | |
tree | 7a6df0c028935242063f27b56e329f0fe7552ec7 /.gitignore | |
parent | 97c54cf2a4e87630eab18ad53b88348ec7296176 (diff) |
iio: adc: at91-sama5d2_adc: update for other trigger usage
This change will allow the at91-sama5d2_adc driver to use other triggers
than it's own.
In particular, tested with the sysfs trigger.
To be able to achieve this functionality, some changes were required:
1) Do not enable/disable channels when enabling/disabling the trigger.
This is because the trigger is enabled/disabled only for our trigger
(obviously). We need channels enabled/disabled regardless of what trigger is
being used.
2) Cope with DMA : DMA cannot be used when using another type of trigger.
Other triggers work through pollfunc, so we get polled anyway on every trigger.
Thus we have to obtain data at every trigger.
3) When to start conversion? The usual pollfunc (store time from subsystem)
would be in hard irq and this would be a good way, but current iio subsystem
recommends to have it in the threaded irq. Thus adding software start
code in this handler.
4) Buffer config: we need to setup buffer regardless of our own device's
trigger. We may get one attached later.
5) IRQ handling: we use our own device IRQ only if it's our own trigger
and we do not use DMA . If we use DMA, we use the DMA controller's IRQ.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions