summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2018-09-25 00:13:26 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-09-29 12:50:48 +0100
commit827df0571fb32d308f26c34641c1a88ba500d28e (patch)
tree45dc0f7349189f3c0f8e8bbe2377ea3d1c9a24a9 /arch/m68k
parentbdd4b07ffa5e5d2d577952a559a87498e7bac0da (diff)
downloadlinux-827df0571fb32d308f26c34641c1a88ba500d28e.tar.gz
linux-827df0571fb32d308f26c34641c1a88ba500d28e.tar.bz2
linux-827df0571fb32d308f26c34641c1a88ba500d28e.zip
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>
Diffstat (limited to 'arch/m68k')
0 files changed, 0 insertions, 0 deletions