]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: ad7476: Use mV for internal reference
authorMatti Vaittinen <mazziesaccount@gmail.com>
Mon, 11 Aug 2025 08:50:55 +0000 (11:50 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 12:21:20 +0000 (13:21 +0100)
commit1003d539930177b552e48881c1805fd2bc20066a
treee35ccc9c25a1f68ec676a4cc4d1cf0cf3895a88e
parent72e42b4849c8f0a29ae679eaa4e191cd7698c463
iio: adc: ad7476: Use mV for internal reference

The ad7476 supports some ICs with an internal reference voltage. For
those ICs the reference voltage has been hard-coded as micro volts, but
the value which is later used in code needs to be milli volts. This
results the need to divide hard coded voltage by 1000 before using it.

Simplify code by changing the hard-coded voltage to millivolts and by
dropping the division.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/1c26529fcc039a3ce8b5a336948229ec727ee281.1754901948.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7476.c