From: David Lechner <dlechner@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>,
Marius Cristea <marius.cristea@microchip.com>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: temperature: add support for EMC1812
Date: Sat, 20 Sep 2025 10:05:40 -0500 [thread overview]
Message-ID: <5420e895-fcd4-4632-81d3-389c6439afde@baylibre.com> (raw)
In-Reply-To: <20250920125144.41f70a1f@jic23-huawei>
On 9/20/25 6:51 AM, Jonathan Cameron wrote:
> On Wed, 17 Sep 2025 15:21:58 +0300
> Marius Cristea <marius.cristea@microchip.com> wrote:
>
...
>> + if (ret)
>> + return ret;
>> +
>> + ret = regmap_write(priv->regmap, EMC1812_CONSEC_ALERT_ADDR, 0x70);
>> + if (ret)
>> + return ret;
>> +
>> + ret = regmap_write(priv->regmap, EMC1812_FILTER_SEL_ADDR, 0);
>> + if (ret)
>> + return ret;
>> +
>> + ret = regmap_write(priv->regmap, EMC1812_HOTTEST_CFG_ADDR, 0);
>> + if (ret)
>> + return ret;
>> +
>> + /* Set beta1 and beta2 compensation parameters */
>> + for (i = 0; i < ARRAY_SIZE(priv->beta_values); i++) {
>> + ret = regmap_write(priv->regmap, EMC1812_BETA_CFG_ADDR(i),
>> + priv->beta_values[i]);
>> + if (ret)
>> + return ret;
>> + }
>> +
>> + /* Set ideality factor for all external channels */
>> + ret = regmap_write(priv->regmap, EMC1812_EXT1_IDEALITY_FACTOR_ADDR,
>
> Perhaps a look up table for the registers and a loop?
>
>
Also see regmap_multi_reg_write() and regmap_register_patch().
next prev parent reply other threads:[~2025-09-20 15:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 12:21 [PATCH 0/2] Add support for Microchip EMC1812 Marius Cristea
2025-09-17 12:21 ` [PATCH 1/2] dt-bindings: iio: temperature: add support for EMC1812 Marius Cristea
2025-09-17 14:31 ` Rob Herring (Arm)
2025-09-17 23:34 ` David Lechner
2025-09-25 14:27 ` Marius.Cristea
2025-09-17 12:21 ` [PATCH 2/2] " Marius Cristea
2025-09-18 3:07 ` kernel test robot
2025-09-20 11:51 ` Jonathan Cameron
2025-09-20 15:05 ` David Lechner [this message]
2025-09-23 5:31 ` Dan Carpenter
2025-09-17 13:25 ` [PATCH 0/2] Add support for Microchip EMC1812 David Lechner
2025-09-17 13:30 ` Marius.Cristea
2025-09-17 13:38 ` David Lechner
2025-09-20 11:33 ` Jonathan Cameron
2025-09-24 2:11 ` Guenter Roeck
2025-09-25 9:09 ` Marius.Cristea
2025-09-25 14:32 ` Guenter Roeck
2025-09-27 15:04 ` Jonathan Cameron
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=5420e895-fcd4-4632-81d3-389c6439afde@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marius.cristea@microchip.com \
--cc=nuno.sa@analog.com \
--cc=robh@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
all inboxes | Powered by JetHome®