diff options
author | Lorenzo Bianconi <[email protected]> | 2016-11-16 22:15:28 +0100 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2016-12-31 14:32:09 +0000 |
commit | 65c8aea07de11b6507efa175edb44bd8b4488218 (patch) | |
tree | f16e596bed7448b837e52ddd5da385636de27003 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | b4e8a0eb718749455601fa7b283febc42cca8957 (diff) |
iio: common: st_sensors: fix channel data parsing
Using realbits as i2c/spi read len, when that value is not byte aligned
(e.g 12 bits), lead to skip msb part of out data registers.
Fix this taking into account scan_type.shift in addition to
scan_type.realbits as read length:
read_len = DIV_ROUND_UP(realbits + shift, 8)
This fix has been tested on 8, 12, 16, 24 bit sensors
Fixes: e7385de5291e ("iio:st_sensors: align on storagebits boundaries")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Tested-by: Linus Walleij <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions