diff options
author | Andrew F. Davis <afd@ti.com> | 2016-05-01 23:36:58 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-05-04 13:08:14 +0300 |
commit | 24b9dea764bdf0de8434fb4567e7f62038ba869e (patch) | |
tree | 0a47eb7be88c9beed70b0c5519f80c5614e6505d /drivers/iio/health/afe440x.h | |
parent | 606c7e6c1b02054febd78aac1d3cff448c7bd052 (diff) | |
download | linux-24b9dea764bdf0de8434fb4567e7f62038ba869e.tar.xz |
iio: health/afe440x: Remove channel names
These AFEs have 4 ADC mesuring stages (called LED2, ALED2, LED1, and
ALED1 in the datasheet), we map these as channels, these stages can serve
different purposes depending on the application. For instance the AFE4404
has an additional LED (LED3), this LED can be timed to be active during
stage 2 (or anystage, but the datasheet describes this case and the name
of the stage reflects this use). This ability is used further in upcoming
parts that tie the front-end gain and the LED timings together. For these
reasons we remove explicit naming the channels.
Without channel names it is best that the index numbers are in order to
match the stage number, reorder the channel numbers.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/health/afe440x.h')
-rw-r--r-- | drivers/iio/health/afe440x.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/health/afe440x.h b/drivers/iio/health/afe440x.h index 583d071af11d..713972fd4601 100644 --- a/drivers/iio/health/afe440x.h +++ b/drivers/iio/health/afe440x.h @@ -103,7 +103,7 @@ struct afe440x_reg_info { .mask = _sm ## _MASK, \ } -#define AFE440X_INTENSITY_CHAN(_index, _name, _mask) \ +#define AFE440X_INTENSITY_CHAN(_index, _mask) \ { \ .type = IIO_INTENSITY, \ .channel = _index, \ @@ -115,20 +115,20 @@ struct afe440x_reg_info { .storagebits = 32, \ .endianness = IIO_CPU, \ }, \ - .extend_name = _name, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ _mask, \ + .indexed = true, \ } -#define AFE440X_CURRENT_CHAN(_index, _name) \ +#define AFE440X_CURRENT_CHAN(_index) \ { \ .type = IIO_CURRENT, \ .channel = _index, \ .address = _index, \ .scan_index = -1, \ - .extend_name = _name, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ BIT(IIO_CHAN_INFO_SCALE), \ + .indexed = true, \ .output = true, \ } |