]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: ad7192: Correct reference voltage
authorAlisa-Dariana Roman <alisa.roman@analog.com>
Sun, 24 Sep 2023 15:21:48 +0000 (18:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:58:58 +0000 (11:58 +0200)
commitae80d5290c1449b4cbe0234cfbfc2c760bc6e1e9
tree6def8cf8e0ea21f209ca669f8261cd592e60658f
parent569a126f244b9ce46e446b769915610f98d85cbc
iio: adc: ad7192: Correct reference voltage

[ Upstream commit 7e7dcab620cd6d34939f615cac63fc0ef7e81c72 ]

The avdd and the reference voltage are two different sources but the
reference voltage was assigned according to the avdd supply.

Add vref regulator structure and set the reference voltage according to
the vref supply from the devicetree.

In case vref supply is missing, reference voltage is set according to
the avdd supply for compatibility with old devicetrees.

Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of staging")
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230924152149.41884-1-alisadariana@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/ad7192.c