ARM: tegra: powermon: lower ina230 average value
Deepak Nibade [Fri, 15 Nov 2013 07:55:16 +0000 (12:55 +0530)]
- 128 samples per reading from ina230 were breaking voltage
  APIs in1_input and shuntvolt1_input
- hence reduce number of averaging samples to 16 per reading

Bug 1405996

Change-Id: I0effc0cfe80d89efd24223638f93c7e3e4e488ca
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/332201
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/board-ardbeg-powermon.c
arch/arm/mach-tegra/board-laguna-powermon.c
arch/arm/mach-tegra/board-macallan-powermon.c
arch/arm/mach-tegra/board-pluto-powermon.c

index a0aa7ad..61269c3 100644 (file)
 #define VDD_CPU_BUCKCPU_REWORKED       10
 #define VDD_1V35_SD2_REWORKED          10
 
-#define AVG_32_SAMPLES (4 << 9)
+#define AVG_SAMPLES (2 << 9) /* 16 samples */
 
 /* AVG is specified from platform data */
-#define INA230_CONT_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_CONT_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                INA230_VSH_CT | INA230_CONT_MODE)
-#define INA230_TRIG_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_TRIG_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                INA230_VSH_CT | INA230_TRIG_MODE)
 
 /* rails on i2c2_0 */
index 9e970db..b6f6b32 100644 (file)
 
 #define PRECISION_MULTIPLIER_LAGUNA    1000
 
-#define AVG_32_SAMPLES (4 << 9)
+#define AVG_SAMPLES (2 << 9) /* 16 samples */
 
 /* AVG is specified from platform data */
-#define INA230_CONT_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_CONT_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                INA230_VSH_CT | INA230_CONT_MODE)
-#define INA230_TRIG_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_TRIG_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                 INA230_VSH_CT | INA230_TRIG_MODE)
 
 enum {
index d3c7175..544c0a6 100644 (file)
 
 #define PRECISION_MULTIPLIER_MACALLAN 1000
 
-#define AVG_32_SAMPLES (4 << 9)
+#define AVG_SAMPLES (2 << 9) /* 16 samples */
 
 /* AVG is specified from platform data */
-#define INA230_CONT_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_CONT_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                INA230_VSH_CT | INA230_CONT_MODE)
-#define INA230_TRIG_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_TRIG_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                 INA230_VSH_CT | INA230_TRIG_MODE)
 
 enum {
index f3d90d9..bec3ca4 100644 (file)
  */
 #define PLUTO_POWER_REWORKED_CONFIG    0x10
 
-#define AVG_32_SAMPLES (4 << 9)
+#define AVG_SAMPLES (2 << 9) /* 16 samples */
 
 /* AVG is specified from platform data */
-#define INA230_CONT_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_CONT_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                INA230_VSH_CT | INA230_CONT_MODE)
-#define INA230_TRIG_CONFIG     (AVG_32_SAMPLES | INA230_VBUS_CT | \
+#define INA230_TRIG_CONFIG     (AVG_SAMPLES | INA230_VBUS_CT | \
                                 INA230_VSH_CT | INA230_TRIG_MODE)
 
 enum {