linux/drivers/iio
Martin Blumenstingl 723a61e0a7 iio: adc: meson-saradc: add support for the chip's temperature sensor
Channel 6 of the SAR ADC can be switched between two inputs:
SAR_ADC_CH6 input (an actual pad on the SoC) and the signal from the
temperature sensor inside the SoC.

To get usable results from the temperature sensor we need to read the
corresponding calibration data from the eFuse and pass it to the SAR ADC
registers. If the temperature sensor is not calibrated (the eFuse data
contains a bit for this) then the driver will only register the
iio_chan_spec's for voltage measurements.

This only enables the temperature sensor for the Meson8 SoC. Meson8b and
Meson8m2 SoCs can be supported in the future as well but we first need
a way to pass the fifth TSC (temperature sensor coefficient) bit to the
HHI register area (apart from that the infrastructure as already
implemented for Meson8 can be used). On the 64-bit SoCs (GXBB, GXL and
GXM) the temperature sensor inside SAR ADC is firmware-controlled (by
BL30, we can simply use the SCPI hwmon driver to get the chip
temperature).

To keep the devicetree interface backwards compatible we simply skip the
temperature sensor initialization if no eFuse nvmem cell is passed via
devicetree.

The public documentation for the SAR ADC IP block does not explain how
to use the registers to read the temperature. The logic from this patch
is based on reading and understanding Amlogic's GPL kernel sources.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-11 15:29:49 +00:00
..
accel iio: accel: kxcjk1013: Add KIOX0009 ACPI Hardware-ID 2018-10-14 18:01:40 +01:00
adc iio: adc: meson-saradc: add support for the chip's temperature sensor 2018-11-11 15:29:49 +00:00
afe iio: afe: rescale: new driver 2018-04-28 18:03:22 +01:00
amplifiers drivers: iio: Update MODULE AUTHOR email address 2018-08-19 17:23:39 +01:00
buffer iio:kfifo_buf: check for uint overflow 2018-03-30 11:16:12 +01:00
chemical iio: chemical: bme680: Remove field value defines 2018-08-25 09:13:45 +01:00
common iio: st_sensors: miscellaneous cleanup 2018-10-21 15:33:36 +01:00
counter iio: 104-quad-8: Provide defines for magic numbers 2018-06-10 11:52:30 +01:00
dac iio:dac:ti-dac7311 Add driver for Texas Instrument DAC7311 2018-11-11 15:29:44 +00:00
dummy iio:dummy: Add extra paragraphs on Kconfig 2018-03-03 15:20:16 +00:00
frequency iio: Convert to using %pOFn instead of device_node.name 2018-09-02 18:54:31 +01:00
gyro iio: Replace occurrences of magic number 0 by IIO_CHAN_INFO_RAW 2018-03-07 20:14:36 +00:00
health iio: health: max30102: Mark expected switch fall-throughs 2018-08-19 17:21:35 +01:00
humidity iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
imu Merge 4.19-rc4 into staging-next 2018-09-16 22:04:13 +02:00
light iio: light: bh1750: Add device tree support 2018-09-29 12:26:07 +01:00
magnetometer iio:magnetometer: st_magn: add BDU settings 2018-11-11 15:29:43 +00:00
multiplexer iio: multiplexer: switch to SPDX license identifier 2018-08-20 19:28:26 +01:00
orientation iio:orientation: drop assign iio_info.driver_module 2017-08-22 21:33:36 +01:00
potentiometer iio: potentiometer: tpl0102: add IIO_AVAIL_RANGE support 2018-11-11 15:29:45 +00:00
potentiostat iio: potentiostat: lmp91000: add LMP91002 support 2018-05-12 11:02:44 +01:00
pressure iio: pressure: ms5611: switch to SPDX identifier 2018-09-08 15:04:02 +01:00
proximity iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor. 2018-09-22 16:42:56 +01:00
resolver staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
temperature First set of IIO fixes for the 4.19 cycle. 2018-09-09 09:33:29 +02:00
trigger drivers: iio: Update MODULE AUTHOR email address 2018-08-19 17:23:39 +01:00
iio_core.h the rest of drivers/*: annotate ->poll() instances 2017-11-28 11:06:58 -05:00
iio_core_trigger.h
industrialio-buffer.c First round of IIO fixes for the 4.16 cycle. 2018-02-20 10:03:22 +01:00
industrialio-configfs.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-core.c iio: Add modifier for DUV light 2018-07-23 19:18:10 +01:00
industrialio-event.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
industrialio-sw-device.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-sw-trigger.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-trigger.c iio:trigger: Remove necessity to have a trig->ops structure. 2017-08-22 21:20:28 +01:00
industrialio-triggered-event.c
inkern.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
Kconfig staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
Makefile staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00