linux-stable/drivers/iio
Martin Blumenstingl 827df0571f iio: adc: meson-saradc: use the address attribute from iio_chan_spec
Until now the "channel" number is identical to how the channel is
identified inside the (FIFO) registers. In our case we have eight
channels and the hardware also has eight inputs.

However, there are two special inputs:
- channel 6 can select between the SAR_ADC_CH6 pad and the chip's
  internal temperature sensor
- channel 7 can select between SAR_ADC_CH7 and VSS, VDD / 4, VDD / 2,
  VDD * 3 / 4 and VDD.

When programming the registers to read for example the temperature
sensor we have to select FIFO channel 6, set the correct bit which muxes
channel 6 to the temperature sensor and then start the ADC measurement
for channel 6 as usual.

When we add support for the temperature sensor the driver has to know
about that it has to use FIFO channel 6 to measure using the chip's
internal temperature sensor. However, in that case the iio_chan_spec
channel will not be 6 because this is already used for the SAR_ADC_CH6
pad input. Thus we use iio_chan_spec's address field to store the FIFO
channel number for each channel.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-29 12:50:48 +01:00
..
accel iio: adxl372: Add support for I2C communication 2018-09-08 15:54:38 +01:00
adc iio: adc: meson-saradc: use the address attribute from iio_chan_spec 2018-09-29 12:50:48 +01: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: change strncpy+truncation to strlcpy 2018-07-15 11:38:06 +01:00
counter iio: 104-quad-8: Provide defines for magic numbers 2018-06-10 11:52:30 +01:00
dac 1st round of IIO new device support, features and cleanups in the 4.20 cycle. 2018-09-14 10:38:48 +02: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 iio: imu: st_lsm6dsx: add support to LSM6DSO 2018-09-02 21:30:47 +01:00
light iio: light: bh1750: Add device tree support 2018-09-29 12:26:07 +01:00
magnetometer iio: magnetometer: hmc5843: Fixed a comment error. 2018-09-22 10:23:51 +01:00
multiplexer iio: multiplexer: switch to SPDX license identifier 2018-08-20 19:28:26 +01:00
orientation
potentiometer iio: potentiometer: mcp4531: switch to SPDX license identifier 2018-08-20 19:26:25 +01: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 i2c: remove i2c_lock_adapter and use i2c_lock_bus directly 2018-07-13 00:09:37 +02:00
trigger drivers: iio: Update MODULE AUTHOR email address 2018-08-19 17:23:39 +01:00
iio_core.h
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
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
industrialio-sw-trigger.c
industrialio-trigger.c
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