diff options
| author | Petre Rodan <petre.rodan@subdimension.ro> | 2026-01-14 18:55:33 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-26 15:01:25 -0800 |
| commit | 7c72f264183e912a8d21d258a143c477fb2aa037 (patch) | |
| tree | aaece36b0b01116b6da5fc5b1537f2261a152509 /drivers/iio | |
| parent | 3e7a4456616e1289c50687c3a5468bf521541a06 (diff) | |
iio: pressure: mprls0025pa: fix scan_type struct
[ Upstream commit 8a228e036926f7e57421d750c3724e63f11b808a ]
Fix the scan_type sign and realbits assignment.
The pressure is a 24bit unsigned int between output_min and output_max.
transfer function A: 10% to 90% of 2^24
transfer function B: 2.5% to 22.5% of 2^24
transfer function C: 20% to 80% of 2^24
[MPR_FUNCTION_A] = { .output_min = 1677722, .output_max = 15099494 }
[MPR_FUNCTION_B] = { .output_min = 419430, .output_max = 3774874 }
[MPR_FUNCTION_C] = { .output_min = 3355443, .output_max = 13421773 }
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iio')
| -rw-r--r-- | drivers/iio/pressure/mprls0025pa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c index 4b23f87a822b..6ba45d4c16b3 100644 --- a/drivers/iio/pressure/mprls0025pa.c +++ b/drivers/iio/pressure/mprls0025pa.c @@ -160,8 +160,8 @@ static const struct iio_chan_spec mpr_channels[] = { BIT(IIO_CHAN_INFO_OFFSET), .scan_index = 0, .scan_type = { - .sign = 's', - .realbits = 32, + .sign = 'u', + .realbits = 24, .storagebits = 32, .endianness = IIO_CPU, }, |
