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


Groups > linux.kernel > #1391867 > unrolled thread

[PATCH 03/13] iio: health/afe440x: Remove unneeded initializers

Started by"Andrew F. Davis" <afd@ti.com>
First post2016-05-01 22:40 +0200
Last post2016-05-04 16:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 03/13] iio: health/afe440x: Remove unneeded initializers "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 03/13] iio: health/afe440x: Remove unneeded initializers Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200

#1391867 — [PATCH 03/13] iio: health/afe440x: Remove unneeded initializers

From"Andrew F. Davis" <afd@ti.com>
Date2016-05-01 22:40 +0200
Subject[PATCH 03/13] iio: health/afe440x: Remove unneeded initializers
Message-ID<ru6jM-7pJ-13@gated-at.bofh.it>
The drivers set some register values during initialization that can be
set at runtime, these defaults were used in testing but are not
necessary, remove these.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/iio/health/afe4403.c | 7 +------
 drivers/iio/health/afe4404.c | 4 ----
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
index e3700cf..5484785 100644
--- a/drivers/iio/health/afe4403.c
+++ b/drivers/iio/health/afe4403.c
@@ -472,12 +472,7 @@ static const struct iio_trigger_ops afe4403_trigger_ops = {
 
 static const struct reg_sequence afe4403_reg_sequences[] = {
 	AFE4403_TIMING_PAIRS,
-	{ AFE440X_CONTROL1, AFE440X_CONTROL1_TIMEREN | 0x000007},
-	{ AFE4403_TIA_AMB_GAIN, AFE4403_TIAGAIN_RES_1_M },
-	{ AFE440X_LEDCNTRL, (0x14 << AFE440X_LEDCNTRL_LED1_SHIFT) |
-			    (0x14 << AFE440X_LEDCNTRL_LED2_SHIFT) },
-	{ AFE440X_CONTROL2, AFE440X_CONTROL2_TX_REF_050 <<
-			    AFE440X_CONTROL2_TX_REF_SHIFT },
+	{ AFE440X_CONTROL1, AFE440X_CONTROL1_TIMEREN },
 };
 
 static const struct regmap_range afe4403_yes_ranges[] = {
diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
index 783b9b4..2d4c522 100644
--- a/drivers/iio/health/afe4404.c
+++ b/drivers/iio/health/afe4404.c
@@ -443,10 +443,6 @@ static const struct iio_trigger_ops afe4404_trigger_ops = {
 static const struct reg_sequence afe4404_reg_sequences[] = {
 	AFE4404_TIMING_PAIRS,
 	{ AFE440X_CONTROL1, AFE440X_CONTROL1_TIMEREN },
-	{ AFE4404_TIA_GAIN, AFE4404_TIA_GAIN_RES_50_K },
-	{ AFE440X_LEDCNTRL, (0xf << AFE4404_LEDCNTRL_ILED1_SHIFT) |
-			    (0x3 << AFE4404_LEDCNTRL_ILED2_SHIFT) |
-			    (0x3 << AFE4404_LEDCNTRL_ILED3_SHIFT) },
 	{ AFE440X_CONTROL2, AFE440X_CONTROL3_OSC_ENABLE	},
 };
 
-- 
2.8.1

[toc] | [next] | [standalone]


#1394388

FromJonathan Cameron <jic23@kernel.org>
Date2016-05-04 16:50 +0200
Message-ID<rv6hI-5S0-17@gated-at.bofh.it>
In reply to#1391867
On 01/05/16 21:36, Andrew F. Davis wrote:
> The drivers set some register values during initialization that can be
> set at runtime, these defaults were used in testing but are not
> necessary, remove these.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>
Fair enough - applied.
> ---
>  drivers/iio/health/afe4403.c | 7 +------
>  drivers/iio/health/afe4404.c | 4 ----
>  2 files changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
> index e3700cf..5484785 100644
> --- a/drivers/iio/health/afe4403.c
> +++ b/drivers/iio/health/afe4403.c
> @@ -472,12 +472,7 @@ static const struct iio_trigger_ops afe4403_trigger_ops = {
>  
>  static const struct reg_sequence afe4403_reg_sequences[] = {
>  	AFE4403_TIMING_PAIRS,
> -	{ AFE440X_CONTROL1, AFE440X_CONTROL1_TIMEREN | 0x000007},
> -	{ AFE4403_TIA_AMB_GAIN, AFE4403_TIAGAIN_RES_1_M },
> -	{ AFE440X_LEDCNTRL, (0x14 << AFE440X_LEDCNTRL_LED1_SHIFT) |
> -			    (0x14 << AFE440X_LEDCNTRL_LED2_SHIFT) },
> -	{ AFE440X_CONTROL2, AFE440X_CONTROL2_TX_REF_050 <<
> -			    AFE440X_CONTROL2_TX_REF_SHIFT },
> +	{ AFE440X_CONTROL1, AFE440X_CONTROL1_TIMEREN },
>  };
>  
>  static const struct regmap_range afe4403_yes_ranges[] = {
> diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
> index 783b9b4..2d4c522 100644
> --- a/drivers/iio/health/afe4404.c
> +++ b/drivers/iio/health/afe4404.c
> @@ -443,10 +443,6 @@ static const struct iio_trigger_ops afe4404_trigger_ops = {
>  static const struct reg_sequence afe4404_reg_sequences[] = {
>  	AFE4404_TIMING_PAIRS,
>  	{ AFE440X_CONTROL1, AFE440X_CONTROL1_TIMEREN },
> -	{ AFE4404_TIA_GAIN, AFE4404_TIA_GAIN_RES_50_K },
> -	{ AFE440X_LEDCNTRL, (0xf << AFE4404_LEDCNTRL_ILED1_SHIFT) |
> -			    (0x3 << AFE4404_LEDCNTRL_ILED2_SHIFT) |
> -			    (0x3 << AFE4404_LEDCNTRL_ILED3_SHIFT) },
>  	{ AFE440X_CONTROL2, AFE440X_CONTROL3_OSC_ENABLE	},
>  };
>  
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web