kernel_samsung_a53x/drivers/iio
Alexander Zangerl c39a71f91d 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: c0644160a8b5 ("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>
2024-11-08 11:25:49 +01:00
..
accel Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
addac Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afe Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amplifiers Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
buffer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chemical Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dac Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dummy Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
frequency Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gyro Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
health Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
humidity Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
light Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
magnetometer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
multiplexer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
orientation Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
position Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
potentiometer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
potentiostat Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pressure iio: pressure: ms5611: ms5611_prom_is_valid false negative bug 2024-11-08 11:25:49 +01:00
proximity Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
resolver Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
temperature Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trigger Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iio_core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iio_core_trigger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-sw-device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-sw-trigger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-trigger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
industrialio-triggered-event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inkern.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
TODO Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00