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

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

 



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.

[...]



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux