diff options
author | Andrew F. Davis <afd@ti.com> | 2016-05-01 16:37:01 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-05-04 06:12:55 -0400 |
commit | 3ff34ee2ad2aa16fdde728bd9048098f71391087 (patch) | |
tree | 6d53cc55bace3df64233ad40ca63f1f6f1e726a6 /drivers/iio | |
parent | 1276187c5261217aa9cc23ec153e0e903181c16b (diff) |
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')
-rw-r--r-- | drivers/iio/health/afe4403.c | 10 | ||||
-rw-r--r-- | drivers/iio/health/afe4404.c | 15 |
2 files changed, 10 insertions, 15 deletions
diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c index 610631b036ec..059d52153e78 100644 --- a/drivers/iio/health/afe4403.c +++ b/drivers/iio/health/afe4403.c | |||
@@ -126,8 +126,6 @@ enum afe4403_chan_id { | |||
126 | ALED1, | 126 | ALED1, |
127 | LED2_ALED2, | 127 | LED2_ALED2, |
128 | LED1_ALED1, | 128 | LED1_ALED1, |
129 | ILED1, | ||
130 | ILED2, | ||
131 | }; | 129 | }; |
132 | 130 | ||
133 | static const unsigned int afe4403_channel_values[] = { | 131 | static const unsigned int afe4403_channel_values[] = { |
@@ -140,8 +138,8 @@ static const unsigned int afe4403_channel_values[] = { | |||
140 | }; | 138 | }; |
141 | 139 | ||
142 | static const unsigned int afe4403_channel_leds[] = { | 140 | static const unsigned int afe4403_channel_leds[] = { |
143 | [ILED1] = F_ILED1, | 141 | [LED2] = F_ILED2, |
144 | [ILED2] = F_ILED2, | 142 | [LED1] = F_ILED1, |
145 | }; | 143 | }; |
146 | 144 | ||
147 | static const struct iio_chan_spec afe4403_channels[] = { | 145 | static const struct iio_chan_spec afe4403_channels[] = { |
@@ -153,8 +151,8 @@ static const struct iio_chan_spec afe4403_channels[] = { | |||
153 | AFE440X_INTENSITY_CHAN(LED2_ALED2, 0), | 151 | AFE440X_INTENSITY_CHAN(LED2_ALED2, 0), |
154 | AFE440X_INTENSITY_CHAN(LED1_ALED1, 0), | 152 | AFE440X_INTENSITY_CHAN(LED1_ALED1, 0), |
155 | /* LED current */ | 153 | /* LED current */ |
156 | AFE440X_CURRENT_CHAN(ILED1), | 154 | AFE440X_CURRENT_CHAN(LED2), |
157 | AFE440X_CURRENT_CHAN(ILED2), | 155 | AFE440X_CURRENT_CHAN(LED1), |
158 | }; | 156 | }; |
159 | 157 | ||
160 | static const struct afe440x_val_table afe4403_res_table[] = { | 158 | static const struct afe440x_val_table afe4403_res_table[] = { |
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 { | |||
128 | ALED1, | 128 | ALED1, |
129 | LED2_ALED2, | 129 | LED2_ALED2, |
130 | LED1_ALED1, | 130 | LED1_ALED1, |
131 | ILED1, | ||
132 | ILED2, | ||
133 | ILED3, | ||
134 | }; | 131 | }; |
135 | 132 | ||
136 | static const unsigned int afe4404_channel_values[] = { | 133 | static const unsigned int afe4404_channel_values[] = { |
@@ -143,9 +140,9 @@ static const unsigned int afe4404_channel_values[] = { | |||
143 | }; | 140 | }; |
144 | 141 | ||
145 | static const unsigned int afe4404_channel_leds[] = { | 142 | static const unsigned int afe4404_channel_leds[] = { |
146 | [ILED1] = F_ILED1, | 143 | [LED2] = F_ILED2, |
147 | [ILED2] = F_ILED2, | 144 | [ALED2] = F_ILED3, |
148 | [ILED3] = F_ILED3, | 145 | [LED1] = F_ILED1, |
149 | }; | 146 | }; |
150 | 147 | ||
151 | static const unsigned int afe4404_channel_offdacs[] = { | 148 | static const unsigned int afe4404_channel_offdacs[] = { |
@@ -164,9 +161,9 @@ static const struct iio_chan_spec afe4404_channels[] = { | |||
164 | AFE440X_INTENSITY_CHAN(LED2_ALED2, 0), | 161 | AFE440X_INTENSITY_CHAN(LED2_ALED2, 0), |
165 | AFE440X_INTENSITY_CHAN(LED1_ALED1, 0), | 162 | AFE440X_INTENSITY_CHAN(LED1_ALED1, 0), |
166 | /* LED current */ | 163 | /* LED current */ |
167 | AFE440X_CURRENT_CHAN(ILED1), | 164 | AFE440X_CURRENT_CHAN(LED2), |
168 | AFE440X_CURRENT_CHAN(ILED2), | 165 | AFE440X_CURRENT_CHAN(ALED2), |
169 | AFE440X_CURRENT_CHAN(ILED3), | 166 | AFE440X_CURRENT_CHAN(LED1), |
170 | }; | 167 | }; |
171 | 168 | ||
172 | static const struct afe440x_val_table afe4404_res_table[] = { | 169 | static const struct afe440x_val_table afe4404_res_table[] = { |