aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorH Hartley Sweeten <[email protected]>2016-04-08 10:14:59 -0700
committerGreg Kroah-Hartman <[email protected]>2016-04-28 22:12:06 -0700
commitafd055838cfb6f387e8b6d1f884a7ff529524e06 (patch)
treec9f88e6853d1e0d0e1e519aaf8e96c1ff2bd2b25 /tools/perf/scripts/python
parentd375278d666760e195693b57415ba0a125cadd55 (diff)
staging: comedi: das1800: fix analog input sample munging
The analog input samples are 2's complement when the inputs are configured for bipolar ranges and offset binary when they are unipolar ranges. For bipolar ranges the sample needs to be munged to the offset binary format that comedi uses. The (*insn_read) does the munging correctly but the async command support incorrectly munges the data for both bipolar and unipolar ranges when reading the remaining samples from the fifo in das1800_handle_fifo_not_empty(). Add a (*munge) function to the analog input subdevice so that the samples are correctly munged when they are added to the async buffer by comedi_buf_write_samples(). Add a flag to the private data and set it in the (*do_cmd) so that the munging is only done for bipolar ranges. Clarify the code by using the core helper functions to check the range and do the munging. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions