diff options
author | Andrew F. Davis <afd@ti.com> | 2016-05-01 22:37:01 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-05-04 12:12:55 +0200 |
commit | 3ff34ee2ad2aa16fdde728bd9048098f71391087 (patch) | |
tree | 6d53cc55bace3df64233ad40ca63f1f6f1e726a6 /drivers/iio/health/afe4404.c | |
parent | iio: health/afe440x: Make gain settings a modifier for the stages (diff) | |
download | linux-3ff34ee2ad2aa16fdde728bd9048098f71391087.tar.xz linux-3ff34ee2ad2aa16fdde728bd9048098f71391087.zip |
iio: health/afe440x: Match LED currents to stages
The current channel number for the LEDs should match the stage
number that they are active during, fix this here.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/health/afe4404.c')
-rw-r--r-- | drivers/iio/health/afe4404.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c index 69116cdd9d92..aa8770b291c8 100644 --- a/drivers/iio/health/afe4404.c +++ b/drivers/iio/health/afe4404.c @@ -128,9 +128,6 @@ enum afe4404_chan_id { ALED1, LED2_ALED2, LED1_ALED1, - ILED1, - ILED2, - ILED3, }; static const unsigned int afe4404_channel_values[] = { @@ -143,9 +140,9 @@ static const unsigned int afe4404_channel_values[] = { }; static const unsigned int afe4404_channel_leds[] = { - [ILED1] = F_ILED1, - [ILED2] = F_ILED2, - [ILED3] = F_ILED3, + [LED2] = F_ILED2, + [ALED2] = F_ILED3, + [LED1] = F_ILED1, }; static const unsigned int afe4404_channel_offdacs[] = { @@ -164,9 +161,9 @@ static const struct iio_chan_spec afe4404_channels[] = { AFE440X_INTENSITY_CHAN(LED2_ALED2, 0), AFE440X_INTENSITY_CHAN(LED1_ALED1, 0), /* LED current */ - AFE440X_CURRENT_CHAN(ILED1), - AFE440X_CURRENT_CHAN(ILED2), - AFE440X_CURRENT_CHAN(ILED3), + AFE440X_CURRENT_CHAN(LED2), + AFE440X_CURRENT_CHAN(ALED2), + AFE440X_CURRENT_CHAN(LED1), }; static const struct afe440x_val_table afe4404_res_table[] = { |