iio: adc: tsc2046: add vref support
authorOleksij Rempel <o.rempel@pengutronix.de>
Sun, 4 Sep 2022 10:02:02 +0000 (12:02 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 4 Sep 2022 13:55:03 +0000 (14:55 +0100)
commita616a6a1ff164d1502b28c1b1f5d481bfb26d879
treee55520d56235df761b5402d0edb62718c5ac2e28
parent6cda6aa83c0b548471bc30cc2083fe5fd255591b
iio: adc: tsc2046: add vref support

If VREF pin is attached, we should use external VREF source instead of
the internal. Otherwise we will get wrong measurements on some of the channel
types.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220904100203.3614502-2-o.rempel@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-tsc2046.c