devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Crt Mori <cmo@melexis.com>
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 5/5] iio: mlx90614: Add MLX90615 support
Date: Mon, 8 May 2023 13:32:52 +0200	[thread overview]
Message-ID: <189306ca-dbd9-508c-a6ca-32199dbaeb79@denx.de> (raw)
In-Reply-To: <CAKv63utbVqRjmyP_cN=d2Jewpp6hgVHzSJdm4gjKBkaHKb2LuQ@mail.gmail.com>

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.

[...]

  reply	other threads:[~2023-05-08 11:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-07 18:46 [PATCH v2 1/5] dt-bindings: iio: temperature: melexis,mlx90614: Document MLX90615 support Marek Vasut
2023-05-07 18:46 ` [PATCH v2 2/5] iio: mlx90614: Sort headers Marek Vasut
2023-05-08  9:48   ` Crt Mori
2023-05-07 18:46 ` [PATCH v2 3/5] iio: mlx90614: Drop unused register macros Marek Vasut
2023-05-08  9:51   ` Crt Mori
2023-05-07 18:46 ` [PATCH v2 4/5] iio: mlx90614: Factor our register IO and constants into model specific descriptor Marek Vasut
2023-05-08 10:06   ` Crt Mori
2023-05-07 18:46 ` [PATCH v2 5/5] iio: mlx90614: Add MLX90615 support Marek Vasut
2023-05-08 10:10   ` Crt Mori
2023-05-08 11:32     ` Marek Vasut [this message]
2023-05-10  7:33       ` Crt Mori
2023-05-10 16:25         ` Marek Vasut
2023-05-08  9:48 ` [PATCH v2 1/5] dt-bindings: iio: temperature: melexis,mlx90614: Document " Crt Mori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=189306ca-dbd9-508c-a6ca-32199dbaeb79@denx.de \
    --to=marex@denx.de \
    --cc=cmo@melexis.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).