aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorIan Abbott <[email protected]>2021-03-01 16:57:54 +0000
committerGreg Kroah-Hartman <[email protected]>2021-03-10 09:25:31 +0100
commit5fc336c6101ec9cca37a062253c01c0429c44a16 (patch)
tree3d9ec025578b9b76adfd5c3a8f881684275e221a /tools/perf/scripts/python/event_analyzing_sample.py
parent46ffba0622f7171208fa2ec9d9d4ddc51c9ae1b4 (diff)
staging: comedi: dt2814: Call dt2814_ai_clear() during initialization
The Comedi "attach" handler `dt2814_attach()` writes to the Control register to turn off the timer enable 'ENB' bit, which triggers a conversion. It then sleeps awhile and checks the Status register, returning an error if the ERR bit is set. However, the ERR bit could have been set due to the conversion being triggered while the A/D converter was busy (unlikely) or due to the conversion being triggered before some previous sample had been read from the A/D Data register. Replace the existing code with a call to `dt2814_ai_clear()` which waits for any conversion to finish and then clears any unread data or error condition. A non-zero return value from `dt2814_ai_clear()` indicates a time-out while waiting for the A/D converter to become non-busy. Return an error in that case. Signed-off-by: Ian Abbott <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions