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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 06:19:54 +0000 (23:19 -0700)
commite9aba80e289b3491597422f1bf843be5e8099a2d
tree1d1e6f2e1704899dd272cffa692d23207edb9809
parentd2e3dbf9c3449c208b962dff4d68bab013a16b61
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