summaryrefslogtreecommitdiff
path: root/drivers/iio/buffer
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-10 02:11:46 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-01-22 11:52:06 +0300
commit7ae7f75080733d1d0e7c32156725c5729b02404d (patch)
tree6a5e26a89f1aa83d8feecf6f784a680a70a5d4c8 /drivers/iio/buffer
parent07498719bedecc8be1ecc62ea50315e91a668cac (diff)
downloadlinux-7ae7f75080733d1d0e7c32156725c5729b02404d.tar.xz
iio:common:ms_sensors:ms_sensors_i2c: rework CRC calculation helper
The CRC calculation always happens on 8 words which is why there is an extra element in the prom array of struct ms_tp_dev. However, on ms5637 and similar, only 7 words are readable. Then, set MS_SENSORS_TP_PROM_WORDS_NB to 8 and stop passing a len parameter to ms_sensors_tp_crc_valid as this simply hide the fact that it is hardcoded. Finally, use the newly introduced hw->prom_len to know how many words can be read. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210109231148.1168104-5-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/buffer')
0 files changed, 0 insertions, 0 deletions