]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iio:common:ms_sensors:ms_sensors_i2c: add support for alternative PROM layout
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 9 Jan 2021 23:11:47 +0000 (00:11 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 22 Jan 2021 08:52:07 +0000 (08:52 +0000)
commit9ea7c79097fb3907d7bc587f70963dba7c95658c
treeb5ffbfa657814d36ec6827e641cc2c23c61c5c44
parent7ae7f75080733d1d0e7c32156725c5729b02404d
iio:common:ms_sensors:ms_sensors_i2c: add support for alternative PROM layout

Currently, only the 112bit PROM with 7 words is supported. However the ms58xx
family also have devices with a 128bit PROM on 8 words. See AN520:
C-CODE EXAMPLE FOR MS56XX, MS57XX (EXCEPT ANALOG SENSOR), AND MS58XX SERIES
PRESSURE SENSORS and the various device datasheets.

The difference is that the CRC is the 4 LSBs of word7 instead of being the
4 MSBs of word0.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210109231148.1168104-6-alexandre.belloni@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/ms_sensors/ms_sensors_i2c.c