diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2013-11-02 19:44:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-11-05 22:45:25 +0000 |
commit | a5a3e43111e145aaaec4c60c927a8155b875890a (patch) | |
tree | 66379d7354a1a357360970df6f00cca39c1e12a6 /drivers/power | |
parent | ec7f68e07bf10198717b7824c78201b46bbf1956 (diff) | |
download | blackbird-op-linux-a5a3e43111e145aaaec4c60c927a8155b875890a.tar.gz blackbird-op-linux-a5a3e43111e145aaaec4c60c927a8155b875890a.zip |
iio: Fix sign extension table in mcp3422 driver
the index argument to sign_extend32() gives the bit position (from 0)
to the sign bit
so e.g. if the measurement has 16-bit resolution, we need to pass 15;
a measurement of 0x8000 should be reported as -32768, not 32768
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/power')
0 files changed, 0 insertions, 0 deletions