hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
authorChris Lesiak <chris.lesiak@licor.com>
Tue, 26 May 2015 20:40:44 +0000 (15:40 -0500)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:08:33 +0000 (13:08 +0000)
commit57d5c4751438e08f6e5782960a2d9eb8f3d183e6
tree769ba665fd1e3ed7df87228432c59668a23e2a9c
parent062b12bff72b1130550f68fde67d643a6d1b8e3c
hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE

commit adba657533bdd255f7b78bc8a324091f46b294cd upstream.

When configured via device tree, the associated iio device needs to be
measuring voltage for the conversion to resistance to be correct.
Return -EINVAL if that is not the case.

Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/ntc_thermistor.c