lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5420e895-fcd4-4632-81d3-389c6439afde@baylibre.com>
Date: Sat, 20 Sep 2025 10:05:40 -0500
From: David Lechner <dlechner@...libre.com>
To: Jonathan Cameron <jic23@...nel.org>,
 Marius Cristea <marius.cristea@...rochip.com>
Cc: Nuno Sá <nuno.sa@...log.com>,
 Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iio: temperature: add support for EMC1812

On 9/20/25 6:51 AM, Jonathan Cameron wrote:
> On Wed, 17 Sep 2025 15:21:58 +0300
> Marius Cristea <marius.cristea@...rochip.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().


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ