Re: [PATCH v2 5/5] iio: mlx90614: Add MLX90615 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 8 May 2023 at 13:32, Marek Vasut <marex@xxxxxxx> wrote:
>
> On 5/8/23 12:10, Crt Mori wrote:
>
> [...]
>
> >> @@ -666,14 +678,43 @@ static const struct mlx_chip_info mlx90614_chip_info = {
> >>          },
> >>   };
> >>
> >> +static const struct mlx_chip_info mlx90615_chip_info = {
> >> +       .op_eeprom_emissivity           = MLX90615_OP_EEPROM | 0x03,
> >> +       .op_eeprom_config1              = MLX90615_OP_EEPROM | 0x02,
> >> +       .op_ram_ta                      = MLX90615_OP_RAM | 0x06,
> >> +       .op_ram_tobj1                   = MLX90615_OP_RAM | 0x07,
> >> +       .op_ram_tobj2                   = MLX90615_OP_RAM | 0x08,
> >> +       .op_sleep                       = MLX90615_OP_SLEEP,
> >> +       .dual_channel                   = false,
> >> +       .wakeup_delay_ms                = MLX90615_TIMING_WAKEUP,
> >> +       .emissivity_max                 = 16383,
> >> +       .emissivity_res                 = 1000 000 000 / 16383,
> > This makes me wonder if we could just drop the emissivity_res and have
> > it calculate it using emissivity_max, since both chips will do it.
>
> We can do that (i.e. change done locally now).
>
> >> +       .fir_config_mask                = 0,    /* MLX90615 FIR is fixed */
> >> +       .iir_config_mask                = MLX90615_CONFIG_IIR_MASK,
> >> +       /* IIR value 0 is FORBIDDEN COMBINATION on MLX90615 */
> >> +       .iir_valid_offset               = 1,
> >> +       .iir_values                     = { 723, 77, 42, 31, 28, 20, 18 },
> >> +       .iir_freqs                      = {
> >> +               { 0, 180000 },  /* 14% ~= 0.18 Hz */
> >> +               { 0, 200000 },  /* 17% ~= 0.20 Hz */
> >> +               { 0, 280000 },  /* 20% ~= 0.28 Hz */
> >> +               { 0, 310000 },  /* 25% ~= 0.31 Hz */
> >> +               { 0, 420000 },  /* 33% ~= 0.42 Hz */
> >> +               { 0, 770000 },  /* 50% ~= 0.77 Hz */
> >> +               { 7, 230000 },  /* 100% ~= 7.23 Hz */
>
> Before I send a V3, can you please double-check these ^ IIR coefficients
> ? I approximated those, but I suspect my approximation might not be
> accurate.
>
I have reached out to the developer for the 90615 and here is his message:

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)

It does differ to yours, so what was your source?
> [...]



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux