Skip to content
/ linux Public

Commit 7281a0c

Browse files
rodanSasha Levin
authored andcommitted
iio: pressure: mprls0025pa: fix scan_type struct
[ Upstream commit 8a228e0 ] 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: 713337d ("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>
1 parent 6dd1e95 commit 7281a0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/pressure/mprls0025pa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ static const struct iio_chan_spec mpr_channels[] = {
132132
BIT(IIO_CHAN_INFO_OFFSET),
133133
.scan_index = 0,
134134
.scan_type = {
135-
.sign = 's',
136-
.realbits = 32,
135+
.sign = 'u',
136+
.realbits = 24,
137137
.storagebits = 32,
138138
.endianness = IIO_CPU,
139139
},

0 commit comments

Comments
 (0)