aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorDimitri Fedrau <dima.fedrau@gmail.com>2024-06-05 21:21:35 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-06-09 11:05:03 +0100
commit9547d6a4c65e975e40e203900322342ef7379c52 (patch)
tree6627971e92d677ee1e8ed5d5b01c183b3391ec2f /tools/perf/scripts/python/bin/export-to-postgresql-report
parent75183e461ce033605c3e85518a9f3d4e4ef848a3 (diff)
iio: humidity: hdc3020: fix hysteresis representation
According to the ABI docs hysteresis values are represented as offsets to threshold values. Current implementation represents hysteresis values as absolute values which is wrong. Nevertheless the device stores them as absolute values and the datasheet refers to them as clear thresholds. Fix the reading and writing of hysteresis values by including thresholds into calculations. Hysteresis values that result in threshold clear values that are out of limits will be truncated. To check that the threshold clear values are correct, registers are read out using i2ctransfer and the corresponding temperature and relative humidity thresholds are calculated using the formulas in the datasheet. Fixes: 3ad0e7e5f0cb ("iio: humidity: hdc3020: add threshold events support") Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com> Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240605192136.38146-1-dima.fedrau@gmail.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions