Commit graph

2 commits

Author SHA1 Message Date
Daniel Lezcano
d377aba193 thermal/drivers/generic-iio-adc: Switch tz request to devm version
Everything mentionned here:
 https://lkml.org/lkml/2016/4/20/850

This driver was added before the devm_iio_channel_get() function version was
merged. The sensor should be released before the iio channel, thus we had to
use the non-devm version of thermal_zone_of_sensor_register().

Now the devm_iio_channel_get() is available, do the corresponding change in
this driver and remove gadc_thermal_remove().

[Compiled tested only]

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2017-10-31 19:32:17 -07:00
Laxman Dewangan
b3aef78f76 thermal: generic-adc: Add ADC based thermal sensor driver
In some of platform, thermal sensors like NCT thermistors are
connected to the one of ADC channel. The temperature is read by
reading the voltage across the sensor resistance via ADC. Lookup
table for ADC read value to temperature is referred to get
temperature. ADC is read via IIO framework.

Add support for thermal sensor driver which read the voltage across
sensor resistance from ADC through IIO framework.

Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-05-17 07:28:31 -07:00