aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorH Hartley Sweeten <[email protected]>2015-09-24 17:52:08 -0700
committerGreg Kroah-Hartman <[email protected]>2015-09-29 03:32:22 +0200
commit8e0768b184f361a30c640b7571d602f408744c13 (patch)
treeb4aed0f3d92fb59f2bab84217c3fb0e5894479cf /tools/perf/scripts/python
parent78c1652c7eeac2dff6961678e60c3d792cbe83b5 (diff)
staging: comedi: rtd520: fix rtd_ao_winsn()
The "comedi range and offset conversions" in this function is incorrect. According to the hardware manual, the DAC registers are defined as: | D15 | D14-D03 | D02 | | D01 | D00 | | Sign | 12-bit data | (see manual) | The extended 'Sign' bit is only used for bipolar ranges to indicate negative 12-bit data values. The current code actually flips the sign for all bipolar data values instead of just munging the value to 2's complement and extending the sign bit. Fix the function to correctly munge the comedi offset binary values into 2's complement and extended the sign when bipolar ranges are specified. For aesthetics, rename this function and tidy it up a bit. Save the readback value after the conversion is complete. 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