iio: mlx90614: Factor our register IO and constants into model specific descriptor
authorMarek Vasut <marex@denx.de>
Wed, 10 May 2023 10:22:50 +0000 (12:22 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 23 May 2023 20:20:17 +0000 (21:20 +0100)
commit3d5ead238bc85ecca115481a91b63548f156a7f7
tree3c959a71ebadaa1caa19a9f51f69a1b1578a5966
parent8a0377bf671da3a4737d5bff2a974c3049cedbfe
iio: mlx90614: Factor our register IO and constants into model specific descriptor

Factor out all the differences between MLX90614 and other similar chips
into a structure which describes the chip and allows abstracting out the
differences from the driver code. No functional change.

This patch moves all the RAM and EEPROM IO opcodes into the descriptor
structure and combines them, instead of combining the opcode and offset
in macros.

Acked-by: Crt Mori <cmo@melexis.com>
Tested-by: Crt Mori <cmo@melexis.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20230510102251.10118-5-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/temperature/mlx90614.c