Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1391876

[PATCH 11/13] iio: health/afe440x: Match LED currents to stages

From "Andrew F. Davis" <afd@ti.com>
Newsgroups linux.kernel
Subject [PATCH 11/13] iio: health/afe440x: Match LED currents to stages
Date 2016-05-01 22:50 +0200
Message-ID <ru6ts-7tP-11@gated-at.bofh.it> (permalink)
References <ru6jM-7pJ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/iio/health/afe4403.c | 10 ++++------
 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 610631b..059d521 100644
--- a/drivers/iio/health/afe4403.c
+++ b/drivers/iio/health/afe4403.c
@@ -126,8 +126,6 @@ enum afe4403_chan_id {
 	ALED1,
 	LED2_ALED2,
 	LED1_ALED1,
-	ILED1,
-	ILED2,
 };
 
 static const unsigned int afe4403_channel_values[] = {
@@ -140,8 +138,8 @@ static const unsigned int afe4403_channel_values[] = {
 };
 
 static const unsigned int afe4403_channel_leds[] = {
-	[ILED1] = F_ILED1,
-	[ILED2] = F_ILED2,
+	[LED2] = F_ILED2,
+	[LED1] = F_ILED1,
 };
 
 static const struct iio_chan_spec afe4403_channels[] = {
@@ -153,8 +151,8 @@ static const struct iio_chan_spec afe4403_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(LED2),
+	AFE440X_CURRENT_CHAN(LED1),
 };
 
 static const struct afe440x_val_table afe4403_res_table[] = {
diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
index 69116cd..aa8770b 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[] = {
-- 
2.8.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] Rework for AFE440x drivers to prepare for AFE4405 "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
  [PATCH 10/13] iio: health/afe440x: Make gain settings a modifier for the stages "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 10/13] iio: health/afe440x: Make gain settings a modifier  for the stages Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
  [PATCH 01/13] iio: health/afe440x: Fix kernel-doc format "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 01/13] iio: health/afe440x: Fix kernel-doc format Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
  [PATCH 02/13] iio: health/afe440x: Remove of_match_ptr and ifdefs "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 02/13] iio: health/afe440x: Remove of_match_ptr and ifdefs Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
  [PATCH 13/13] iio: health/afe4404: ENSEPGAIN is part of CONTROL2 register "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 13/13] iio: health/afe4404: ENSEPGAIN is part of CONTROL2  register Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
  [PATCH 07/13] iio: health/afe4404: Remove LED3 input channel "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 07/13] iio: health/afe4404: Remove LED3 input channel Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
  [PATCH 09/13] iio: health/afe440x: Use regmap fields "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 09/13] iio: health/afe440x: Use regmap fields Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
      Re: [PATCH 09/13] iio: health/afe440x: Use regmap fields "Andrew F. Davis" <afd@ti.com> - 2016-05-04 17:40 +0200
  [PATCH 04/13] iio: health/afe440x: Always use separate gain values "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:50 +0200
    Re: [PATCH 04/13] iio: health/afe440x: Always use separate gain  values Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
      Re: [PATCH 04/13] iio: health/afe440x: Always use separate gain  values "Andrew F. Davis" <afd@ti.com> - 2016-05-04 17:20 +0200
        Re: [PATCH 04/13] iio: health/afe440x: Always use separate gain values Jonathan Cameron <jic23@jic23.retrosnub.co.uk> - 2016-05-04 20:40 +0200
  [PATCH 11/13] iio: health/afe440x: Match LED currents to stages "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:50 +0200
  [PATCH 12/13] iio: health/afe440x: Remove unused definitions "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:50 +0200
    Re: [PATCH 12/13] iio: health/afe440x: Remove unused definitions Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
  [PATCH 08/13] iio: health/afe440x: Remove channel names "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:50 +0200
    Re: [PATCH 08/13] iio: health/afe440x: Remove channel names Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200
      Re: [PATCH 08/13] iio: health/afe440x: Remove channel names "Andrew F. Davis" <afd@ti.com> - 2016-05-04 17:30 +0200
  Re: [PATCH 00/13] Rework for AFE440x drivers to prepare for AFE4405 Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200

csiph-web