linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: David Lechner <dlechner@baylibre.com>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] iio: adc: ad7476: Simplify scale handling
Date: Wed, 6 Aug 2025 08:08:38 +0300	[thread overview]
Message-ID: <5223b372-ec07-42e9-9c5f-c713d09a94ff@gmail.com> (raw)
In-Reply-To: <1492897c-fe2e-4ac7-8866-595cd8dfaaf0@baylibre.com>

Hi David,

Thanks for taking a look at this :)

On 05/08/2025 19:09, David Lechner wrote:
> On 8/1/25 5:07 AM, Matti Vaittinen wrote:
>> The ad7476 driver supports variants with different amount of supply
>> regulators. On some variants there is only VCC, which is used as a
>> reference voltage. Others have separate VREF regulator, and some rely on
>> internal VREF. Some have both internal VREF and option to connect
>> external one.
>>
> 
> ...
> 
>> +	if (!st->scale_mv)
>> +		st->scale_mv = st->chip_info->int_vref_uv / 100;
>> +
> 
> Shouldn't this be 1000 rather than 100 to go from microvolts to millivolts?

Yes, Thanks!

> Also, I would just change the chip info to `int_vref_mv` to avoid needing
> to do the division at all.

Yep. I'll do that.

Yours,
	-- Matti

  reply	other threads:[~2025-08-06  5:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01 10:06 [RFC PATCH 0/2] iio: adc: ad7476: Simplifications Matti Vaittinen
2025-08-01 10:07 ` [RFC PATCH 1/2] iio: adc: ad7476: Simplify chip type detection Matti Vaittinen
2025-08-01 11:09   ` Jonathan Cameron
2025-08-04  5:57     ` Matti Vaittinen
2025-08-04  8:33       ` Andy Shevchenko
2025-08-01 22:01   ` Andy Shevchenko
2025-08-04  5:56     ` Matti Vaittinen
2025-08-04  8:31       ` Andy Shevchenko
2025-08-01 10:07 ` [RFC PATCH 2/2] iio: adc: ad7476: Simplify scale handling Matti Vaittinen
2025-08-01 11:12   ` Jonathan Cameron
2025-08-05 16:09   ` David Lechner
2025-08-06  5:08     ` Matti Vaittinen [this message]
2025-08-01 12:23 ` [RFC PATCH 0/2] iio: adc: ad7476: Simplifications Nuno Sá
2025-08-02 10:59 ` Jonathan Cameron
2025-08-04  5:29   ` Matti Vaittinen

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=5223b372-ec07-42e9-9c5f-c713d09a94ff@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=nuno.sa@analog.com \
    /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).