android_kernel_samsung_sm8650/drivers/iio/pressure
Alexander Zangerl 7d4ff34b6c iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
commit fd39d9668f2ce9f4b05ad55e8c8d80c098073e0b upstream.

The ms5611 driver falsely rejects lots of MS5607-02BA03-50 chips
with "PROM integrity check failed" because it doesn't accept a prom crc
value of zero as legitimate.

According to the datasheet for this chip (and the manufacturer's
application note about the PROM CRC), none of the possible values for the
CRC are excluded - but the current code in ms5611_prom_is_valid() ends with

return crc_orig != 0x0000 && crc == crc_orig

Discussed with the driver author (Tomasz Duszynski) and he indicated that
at that time (2015) he was dealing with some faulty chip samples which
returned blank data under some circumstances and/or followed example code
which indicated CRC zero being bad.

As far as I can tell this exception should not be applied anymore; We've
got a few hundred custom boards here with this chip where large numbers
of the prom have a legitimate CRC value 0, and do work fine, but which the
current driver code wrongly rejects.

Signed-off-by: Alexander Zangerl <az@breathe-safe.com>
Fixes: c0644160a8 ("iio: pressure: add support for MS5611 pressure and temperature sensor")
Link: https://lore.kernel.org/r/2535-1695168070.831792@Ze3y.dhYT.s3fx
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
..
abp060mg.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
bmp280-core.c iio: pressure: bmp280: Fix NULL pointer exception 2023-10-19 23:08:55 +02:00
bmp280-i2c.c iio: pressure: bmp280: Add support for BMP380 sensor family 2022-09-21 18:42:54 +01:00
bmp280-regmap.c iio: pressure: bmp280: Add support for BMP380 sensor family 2022-09-21 18:42:54 +01:00
bmp280-spi.c iio: pressure: bmp280: Add support for BMP380 sensor family 2022-09-21 18:42:54 +01:00
bmp280.h iio: pressure: bmp280: Add more tunable config parameters for BMP380 2022-09-21 18:42:54 +01:00
cros_ec_baro.c iio: cros: Register FIFO callback after sensor is registered 2022-07-18 18:29:13 +01:00
dlhl60d.c iio: pressure: dlhl60d: Don't take garbage into consideration when reading data 2022-08-15 22:30:04 +01:00
dps310.c iio: pressure: dps310: Adjust Timeout Settings 2023-10-19 23:08:55 +02:00
hid-sensor-press.c iio: hid-sensor-press: Add timestamp channel 2021-08-09 20:17:36 +01:00
hp03.c iio: pressure: hp03: update device probe to register with devm functions 2021-08-15 16:58:37 +01:00
hp206c.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
icp10100.c iio: pressure: icp10100: Switch from UNIVERSAL to DEFINE_RUNTIME_DEV_PM_OPS(). 2022-09-05 18:08:42 +01:00
Kconfig iio: pressure: bmp280: Add support for BMP380 sensor family 2022-09-21 18:42:54 +01:00
Makefile iio: pressure: icp10100: add driver for InvenSense ICP-101xx 2020-03-08 17:28:52 +00:00
mpl115_i2c.c iio:pressure:mpl115: Move exports into IIO_MPL115 namespace 2022-02-18 11:42:27 +00:00
mpl115_spi.c iio:pressure:mpl115: Move exports into IIO_MPL115 namespace 2022-02-18 11:42:27 +00:00
mpl115.c iio:pressure:mpl115: Move exports into IIO_MPL115 namespace 2022-02-18 11:42:27 +00:00
mpl115.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
mpl3115.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
ms5611_core.c iio: pressure: ms5611: ms5611_prom_is_valid false negative bug 2023-10-19 23:08:55 +02:00
ms5611_i2c.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
ms5611_spi.c iio: pressure: ms5611: changed hardcoded SPI speed to value limited 2022-10-29 12:39:21 +01:00
ms5611.h iio: pressure: ms5611: fixed value compensation bug 2022-10-29 12:37:45 +01:00
ms5637.c iio:common:meas-spec: Move exports into IIO_MEAS_SPEC_SENSORS 2022-02-18 11:42:26 +00:00
st_pressure_buffer.c iio:st-sensors: Remove duplicate MODULE_* 2022-02-18 11:36:54 +00:00
st_pressure_core.c iio: pressure: st_pressure: Add support for LPS22DF 2022-09-21 18:42:53 +01:00
st_pressure_i2c.c iio: pressure: st_pressure: Add support for LPS22DF 2022-09-21 18:42:53 +01:00
st_pressure_spi.c iio: pressure: st_pressure: Add support for LPS22DF 2022-09-21 18:42:53 +01:00
st_pressure.h iio: pressure: st_pressure: Add support for LPS22DF 2022-09-21 18:42:53 +01:00
t5403.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
zpa2326_i2c.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
zpa2326_spi.c Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
zpa2326.c iio:pressure:zpa2326: Move exports into IIO_ZPA2326 namespace 2022-02-18 11:42:26 +00:00
zpa2326.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00