diff options
| author | Stephan Gerhold <[email protected]> | 2020-02-14 11:03:24 +0000 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2020-02-21 11:59:46 +0000 |
| commit | b500c086e4110829a308c23e83a7cdc65b26228a (patch) | |
| tree | c12f2396db9d0a7c13e7dfdd72ee545552a883d3 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | iio: trigger: stm32-timer: disable master mode when stopping (diff) | |
| download | kernel-b500c086e4110829a308c23e83a7cdc65b26228a.tar.gz kernel-b500c086e4110829a308c23e83a7cdc65b26228a.zip | |
iio: magnetometer: ak8974: Fix negative raw values in sysfs
At the moment, reading from in_magn_*_raw in sysfs tends to return
large values around 65000, even though the output of ak8974 is actually
limited to ±32768. This happens because the value is never converted
to the signed 16-bit integer variant.
Add an explicit cast to s16 to fix this.
Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974")
Signed-off-by: Stephan Gerhold <[email protected]>
Reviewed-by: Linus Waleij <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
