]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: pressure: mprls0025pa: fix pressure calculation
authorPetre Rodan <petre.rodan@subdimension.ro>
Wed, 14 Jan 2026 16:55:34 +0000 (18:55 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 16 Jan 2026 17:40:40 +0000 (17:40 +0000)
commitd63403d4e31ae537fefc5c0ee9d90f29b4fc532b
tree1cb5772b4dc58a5100276f98add7e2c7686f96c2
parent8a228e036926f7e57421d750c3724e63f11b808a
iio: pressure: mprls0025pa: fix pressure calculation

A sign change is needed for proper calculation of the pressure.

This is a minor fix since it only affects users that might have custom
silicon from Honeywell that has honeywell,pmin-pascal != 0.

Also due to the fact that raw pressure values can not be lower
than output_min (400k-3.3M) there is no need to calculate a decimal for
the offset.

Fixes: 713337d9143e ("iio: pressure: Honeywell mprls0025pa pressure sensor")
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/mprls0025pa.c
drivers/iio/pressure/mprls0025pa.h