• Marek Vasut's avatar
    iio: mlx90614: Add MLX90615 support · 7699e975
    Marek Vasut authored
    Add support for MLX90615 Infra Red Thermometer, which seems to be
    the predecesor of MLX90614 . There are significant differences in
    the register layout compared to MLX90614, but the functionality
    of the device is virtually identical.
    
    The following differences have been identified:
    - RAM/EEPROM/SLEEP access opcodes are different
    - RAM/EEPROM registers are at different offsets
    - EEPROM emissivity and configuration registers are at different offsets
    - EEPROM configuration register bits are shuffled around
    - EEPROM emissivity settings are 14 bit on MLX90615 , 16 bit on MLX90614
    - MLX90615 can only ever support one sensor, MLX90614 could support two
    - FIR filter is set to fixed settings on MLX90615
    - IIR filter coefficients are different
    
    This patch fills in the MLX90615 specific description and quirk handling.
    
    The IIR filter coefficients were provided by Melexis as follows:
    0b0000 - Forbidden value
    0b0001 - 100% - settling time = refresh rate = 205ms (around 5Hz)
    0b0010 - 50% - settling time = 2050ms (around 0.5Hz)
    0b0011 - 33% - settling time = 36900ms (around 0.3Hz)
    0b0100 - 25% - settling time = 5125ms (around 0.2Hz)
    0b0101 - 20% - settling time = 6355ms (around 0.15Hz)
    0b0110 - 17% - settling time = 7790ms (around 0.13Hz)
    0b0111 - 14% - settling time = 9225ms (around 0.1Hz)
    Signed-off-by: default avatarMarek Vasut <marex@denx.de>
    Acked-by: default avatarCrt Mori <cmo@melexis.com>
    Link: https://lore.kernel.org/r/20230510102251.10118-6-marex@denx.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    7699e975
mlx90614.c 21.6 KB