summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-02-13 10:33:13 -0700
committerCommit Bot <commit-bot@chromium.org>2020-02-14 00:56:16 +0000
commit68fb0ff425e97ee7d014e1777490f3f0da6316cb (patch)
treec4b69f8fe0d9c672f46bce3d19aa6127e191742f
parent63e6072b454d41e85fd3763abff412d73090ce2d (diff)
downloadchrome-ec-68fb0ff425e97ee7d014e1777490f3f0da6316cb.tar.gz
Temp sensor: Remove action_delay_sec field
The action_delay_sec field hasn't actually been referenced by any code since 2013. Removing the corresponding struct field. BUG=None BRANCH=None TEST=builds Change-Id: Ia7334c26b85d0161ff61bb51fbdda61bb921595a Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2054945 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--baseboard/grunt/baseboard.c6
-rw-r--r--baseboard/intelrvp/baseboard.c6
-rw-r--r--baseboard/kalista/baseboard.c4
-rw-r--r--baseboard/volteer/baseboard.c12
-rw-r--r--baseboard/zork/baseboard.c3
-rw-r--r--board/akemi/board.c9
-rw-r--r--board/ampton/board.c9
-rw-r--r--board/atlas/board.c10
-rw-r--r--board/bloog/board.c9
-rw-r--r--board/bobba/board.c9
-rw-r--r--board/casta/board.c9
-rw-r--r--board/coral/board.c10
-rw-r--r--board/dood/board.c9
-rw-r--r--board/dratini/board.c9
-rw-r--r--board/elm/board.c8
-rw-r--r--board/endeavour/board.c4
-rw-r--r--board/eve/board.c12
-rw-r--r--board/fizz/board.c4
-rw-r--r--board/fleex/board.c9
-rw-r--r--board/foob/board.c9
-rw-r--r--board/garg/board.c9
-rw-r--r--board/hatch/board.c6
-rw-r--r--board/helios/board.c12
-rw-r--r--board/host/board.c8
-rw-r--r--board/jinlon/board.c12
-rw-r--r--board/kindred/board.c9
-rw-r--r--board/kohaku/board.c12
-rw-r--r--board/lick/board.c9
-rw-r--r--board/mchpevb1/board.c6
-rw-r--r--board/meep/board.c9
-rw-r--r--board/mushu/board.c6
-rw-r--r--board/nami/board.c6
-rw-r--r--board/nautilus/board.c6
-rw-r--r--board/nocturne/board.c12
-rw-r--r--board/oak/board.c8
-rw-r--r--board/phaser/board.c9
-rw-r--r--board/poppy/board.c10
-rw-r--r--board/puff/board.c2
-rw-r--r--board/rammus/board.c10
-rw-r--r--board/reef/board.c10
-rw-r--r--board/reef_it8320/board.c9
-rw-r--r--board/reef_mchp/board.c7
-rw-r--r--board/samus/board.c30
-rw-r--r--board/strago/board.c8
-rw-r--r--board/stryke/board.c6
-rw-r--r--board/waddledee/board.c6
-rw-r--r--board/yorp/board.c9
-rw-r--r--include/temp_sensor.h3
48 files changed, 157 insertions, 252 deletions
diff --git a/baseboard/grunt/baseboard.c b/baseboard/grunt/baseboard.c
index 80ac9f14a6..5ab7dc8d53 100644
--- a/baseboard/grunt/baseboard.c
+++ b/baseboard/grunt/baseboard.c
@@ -548,9 +548,9 @@ static int board_get_temp(int idx, int *temp_k)
}
const struct temp_sensor_t temp_sensors[] = {
- {"Charger", TEMP_SENSOR_TYPE_BOARD, board_get_temp, 0, 1},
- {"SOC", TEMP_SENSOR_TYPE_BOARD, board_get_temp, 1, 5},
- {"CPU", TEMP_SENSOR_TYPE_CPU, sb_tsi_get_val, 0, 4},
+ {"Charger", TEMP_SENSOR_TYPE_BOARD, board_get_temp, 0},
+ {"SOC", TEMP_SENSOR_TYPE_BOARD, board_get_temp, 1},
+ {"CPU", TEMP_SENSOR_TYPE_CPU, sb_tsi_get_val, 0},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/baseboard/intelrvp/baseboard.c b/baseboard/intelrvp/baseboard.c
index 50aa4d83db..1992d056ef 100644
--- a/baseboard/intelrvp/baseboard.c
+++ b/baseboard/intelrvp/baseboard.c
@@ -65,21 +65,18 @@ const struct temp_sensor_t temp_sensors[] = {
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v0_22k6_47k_4050b,
.idx = ADC_TEMP_SNS_AMBIENT,
- .action_delay_sec = 5,
},
[TEMP_SNS_BATTERY] = {
.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
.idx = 0,
- .action_delay_sec = 1,
},
[TEMP_SNS_DDR] = {
.name = "DDR",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v0_22k6_47k_4050b,
.idx = ADC_TEMP_SNS_DDR,
- .action_delay_sec = 1,
},
#ifdef CONFIG_PECI
[TEMP_SNS_PECI] = {
@@ -87,7 +84,6 @@ const struct temp_sensor_t temp_sensors[] = {
.type = TEMP_SENSOR_TYPE_CPU,
.read = peci_temp_sensor_get_val,
.idx = 0,
- .action_delay_sec = 1,
},
#endif /* CONFIG_PECI */
[TEMP_SNS_SKIN] = {
@@ -95,14 +91,12 @@ const struct temp_sensor_t temp_sensors[] = {
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v0_22k6_47k_4050b,
.idx = ADC_TEMP_SNS_SKIN,
- .action_delay_sec = 1,
},
[TEMP_SNS_VR] = {
.name = "VR",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v0_22k6_47k_4050b,
.idx = ADC_TEMP_SNS_VR,
- .action_delay_sec = 1,
},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/baseboard/kalista/baseboard.c b/baseboard/kalista/baseboard.c
index 660cd5e2d6..859962b07c 100644
--- a/baseboard/kalista/baseboard.c
+++ b/baseboard/kalista/baseboard.c
@@ -226,9 +226,9 @@ uint16_t tcpc_get_alert_status(void)
*/
const struct temp_sensor_t temp_sensors[] = {
{"TMP431_Internal", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_LOCAL, 4},
+ TMP432_IDX_LOCAL},
{"TMP431_Sensor_1", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE1, 4},
+ TMP432_IDX_REMOTE1},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c
index 31d47900f8..69353fabad 100644
--- a/baseboard/volteer/baseboard.c
+++ b/baseboard/volteer/baseboard.c
@@ -267,23 +267,19 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1_CHARGER},
[TEMP_SENSOR_2_PP3300_REGULATOR] = {.name = "PP3300 Regulator",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2_PP3300_REGULATOR,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2_PP3300_REGULATOR},
[TEMP_SENSOR_3_DDR_SOC] = {.name = "DDR and SOC",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_3_DDR_SOC,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_3_DDR_SOC},
[TEMP_SENSOR_4_FAN] = {.name = "Fan",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_4_FAN,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_4_FAN},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c
index ac350d8cce..27286d72ab 100644
--- a/baseboard/zork/baseboard.c
+++ b/baseboard/zork/baseboard.c
@@ -909,21 +909,18 @@ const struct temp_sensor_t temp_sensors[] = {
.type = TEMP_SENSOR_TYPE_BOARD,
.read = board_get_temp,
.idx = TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1,
},
[TEMP_SENSOR_SOC] = {
.name = "SOC",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = board_get_temp,
.idx = TEMP_SENSOR_SOC,
- .action_delay_sec = 5,
},
[TEMP_SENSOR_CPU] = {
.name = "CPU",
.type = TEMP_SENSOR_TYPE_CPU,
.read = sb_tsi_get_val,
.idx = 0,
- .action_delay_sec = 4,
},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/akemi/board.c b/board/akemi/board.c
index b49b1eb041..c379d68fec 100644
--- a/board/akemi/board.c
+++ b/board/akemi/board.c
@@ -312,18 +312,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Temp1",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Temp2",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
[TEMP_SENSOR_3] = {.name = "Temp3",
.type = TEMP_SENSOR_TYPE_CPU,
.read = g753_get_val,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/ampton/board.c b/board/ampton/board.c
index 9dfa1e1db8..df151c8918 100644
--- a/board/ampton/board.c
+++ b/board/ampton/board.c
@@ -134,18 +134,15 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
- .read = charge_get_battery_temp,
- .action_delay_sec = 1},
+ .read = charge_get_battery_temp},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/atlas/board.c b/board/atlas/board.c
index f39ca52243..5a0659ba97 100644
--- a/board/atlas/board.c
+++ b/board/atlas/board.c
@@ -248,16 +248,16 @@ uint16_t tcpc_get_alert_status(void)
}
const struct temp_sensor_t temp_sensors[] = {
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
/* BD99992GW temp sensors are only readable in S0 */
{"Ambient", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM0, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM0},
{"Charger", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM1, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM1},
{"DRAM", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM2, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM2},
{"eMMC", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM3, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM3},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/bloog/board.c b/board/bloog/board.c
index e3b68e8d5f..b2424b5721 100644
--- a/board/bloog/board.c
+++ b/board/bloog/board.c
@@ -89,18 +89,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/bobba/board.c b/board/bobba/board.c
index c971b61241..ac2d16c79e 100644
--- a/board/bobba/board.c
+++ b/board/bobba/board.c
@@ -107,18 +107,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/casta/board.c b/board/casta/board.c
index a14e669a01..070ba45496 100644
--- a/board/casta/board.c
+++ b/board/casta/board.c
@@ -73,18 +73,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/coral/board.c b/board/coral/board.c
index 2c970cc1a7..9da7fb375a 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -407,22 +407,18 @@ static void board_tcpc_init(void)
DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_DEFAULT);
const struct temp_sensor_t temp_sensors[] = {
- /* FIXME(dhendrix): tweak action_delay_sec */
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/dood/board.c b/board/dood/board.c
index de51648b88..3a7b529854 100644
--- a/board/dood/board.c
+++ b/board/dood/board.c
@@ -108,18 +108,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/dratini/board.c b/board/dratini/board.c
index f254e18172..97b6a07eab 100644
--- a/board/dratini/board.c
+++ b/board/dratini/board.c
@@ -310,18 +310,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "5V Reg",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
[TEMP_SENSOR_3] = {.name = "CPU",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_3,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_3},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/elm/board.c b/board/elm/board.c
index 266dc92aa4..29c1b2e510 100644
--- a/board/elm/board.c
+++ b/board/elm/board.c
@@ -152,14 +152,14 @@ BUILD_ASSERT(ARRAY_SIZE(pi3usb9281_chips) ==
const struct temp_sensor_t temp_sensors[] = {
#ifdef CONFIG_TEMP_SENSOR_TMP432
{"TMP432_Internal", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_LOCAL, 4},
+ TMP432_IDX_LOCAL},
{"TMP432_Sensor_1", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE1, 4},
+ TMP432_IDX_REMOTE1},
{"TMP432_Sensor_2", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE2, 4},
+ TMP432_IDX_REMOTE2},
#endif
{"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp,
- 0, 4},
+ 0},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/endeavour/board.c b/board/endeavour/board.c
index 15ec87d92b..974b9c9cfd 100644
--- a/board/endeavour/board.c
+++ b/board/endeavour/board.c
@@ -109,9 +109,9 @@ const int usb_port_enable[USB_PORT_COUNT] = {
*/
const struct temp_sensor_t temp_sensors[] = {
{"TMP431_Internal", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_LOCAL, 4},
+ TMP432_IDX_LOCAL},
{"TMP431_Sensor_1", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE1, 4},
+ TMP432_IDX_REMOTE1},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/eve/board.c b/board/eve/board.c
index baca40c095..452732e393 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -345,18 +345,18 @@ uint16_t tcpc_get_alert_status(void)
}
const struct temp_sensor_t temp_sensors[] = {
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
/* These BD99992GW temp sensors are only readable in S0 */
{"Ambient", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM0, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM0},
{"Charger", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM1, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM1},
{"DRAM", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM2, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM2},
{"eMMC", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM3, 4},
- {"Gyro", TEMP_SENSOR_TYPE_BOARD, bmi160_get_sensor_temp, BASE_GYRO, 1},
+ BD99992GW_ADC_CHANNEL_SYSTHERM3},
+ {"Gyro", TEMP_SENSOR_TYPE_BOARD, bmi160_get_sensor_temp, BASE_GYRO},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/fizz/board.c b/board/fizz/board.c
index 91f386b3cf..8461cc3ae3 100644
--- a/board/fizz/board.c
+++ b/board/fizz/board.c
@@ -266,9 +266,9 @@ uint16_t tcpc_get_alert_status(void)
*/
const struct temp_sensor_t temp_sensors[] = {
{"TMP431_Internal", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_LOCAL, 4},
+ TMP432_IDX_LOCAL},
{"TMP431_Sensor_1", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE1, 4},
+ TMP432_IDX_REMOTE1},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/fleex/board.c b/board/fleex/board.c
index e5270908af..d6d4903686 100644
--- a/board/fleex/board.c
+++ b/board/fleex/board.c
@@ -84,18 +84,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/foob/board.c b/board/foob/board.c
index 94e139dafc..98c03c2b01 100644
--- a/board/foob/board.c
+++ b/board/foob/board.c
@@ -77,18 +77,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/garg/board.c b/board/garg/board.c
index 3b1f7d2315..90495b2d2a 100644
--- a/board/garg/board.c
+++ b/board/garg/board.c
@@ -103,18 +103,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/hatch/board.c b/board/hatch/board.c
index bf1bca7291..ae25f66e5b 100644
--- a/board/hatch/board.c
+++ b/board/hatch/board.c
@@ -394,13 +394,11 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Temp1",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Temp2",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/helios/board.c b/board/helios/board.c
index 5d4c658618..008cdd6e96 100644
--- a/board/helios/board.c
+++ b/board/helios/board.c
@@ -333,23 +333,19 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Temp1",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Temp2",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
[TEMP_SENSOR_3] = {.name = "Temp3",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_3,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_3},
[TEMP_SENSOR_4] = {.name = "Temp4",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_4,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_4},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/host/board.c b/board/host/board.c
index 39bf49a9ed..c342ebca8e 100644
--- a/board/host/board.c
+++ b/board/host/board.c
@@ -41,10 +41,10 @@ test_mockable_static int dummy_temp_get_val(int idx, int *temp_ptr)
}
const struct temp_sensor_t temp_sensors[] = {
- {"CPU", TEMP_SENSOR_TYPE_CPU, dummy_temp_get_val, 0, 3},
- {"Board", TEMP_SENSOR_TYPE_BOARD, dummy_temp_get_val, 1, 3},
- {"Case", TEMP_SENSOR_TYPE_CASE, dummy_temp_get_val, 2, 0},
- {"Battery", TEMP_SENSOR_TYPE_BOARD, dummy_temp_get_val, 3, 0},
+ {"CPU", TEMP_SENSOR_TYPE_CPU, dummy_temp_get_val, 0},
+ {"Board", TEMP_SENSOR_TYPE_BOARD, dummy_temp_get_val, 1},
+ {"Case", TEMP_SENSOR_TYPE_CASE, dummy_temp_get_val, 2},
+ {"Battery", TEMP_SENSOR_TYPE_BOARD, dummy_temp_get_val, 3},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/jinlon/board.c b/board/jinlon/board.c
index 64ea23dddc..1a0936615e 100644
--- a/board/jinlon/board.c
+++ b/board/jinlon/board.c
@@ -326,23 +326,19 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "5v Reg",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
[TEMP_SENSOR_3] = {.name = "CPU",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_3,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_3},
[TEMP_SENSOR_4] = {.name = "IR Sensor",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = oti502_get_val,
- .idx = OTI502_IDX_OBJECT,
- .action_delay_sec = 1},
+ .idx = OTI502_IDX_OBJECT},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/kindred/board.c b/board/kindred/board.c
index 8c768e2575..f468851371 100644
--- a/board/kindred/board.c
+++ b/board/kindred/board.c
@@ -332,18 +332,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Temp1",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Temp2",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
[TEMP_SENSOR_3] = {.name = "Temp3",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_3,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_3},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/kohaku/board.c b/board/kohaku/board.c
index 0afbf6eaf0..1cd8021e13 100644
--- a/board/kohaku/board.c
+++ b/board/kohaku/board.c
@@ -398,23 +398,19 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
[TEMP_SENSOR_3] = {.name = "IA",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_3,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_3},
[TEMP_SENSOR_4] = {.name = "GT",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_4,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_4},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/lick/board.c b/board/lick/board.c
index 8e3cc4c971..b6137f508d 100644
--- a/board/lick/board.c
+++ b/board/lick/board.c
@@ -77,18 +77,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c
index e7daf0ef34..7fd2c16575 100644
--- a/board/mchpevb1/board.c
+++ b/board/mchpevb1/board.c
@@ -451,9 +451,9 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
* a static global in this module.
*/
const struct temp_sensor_t temp_sensors[] = {
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, sb_temp, 0, 4},
- {"Ambient", TEMP_SENSOR_TYPE_BOARD, ds1624_get_val, 0, 4},
- {"Case", TEMP_SENSOR_TYPE_CASE, therm_get_val, (int)ADC_CASE, 4},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, sb_temp, 0},
+ {"Ambient", TEMP_SENSOR_TYPE_BOARD, ds1624_get_val, 0},
+ {"Case", TEMP_SENSOR_TYPE_CASE, therm_get_val, (int)ADC_CASE},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
#endif
diff --git a/board/meep/board.c b/board/meep/board.c
index 8d725f6570..d713f77516 100644
--- a/board/meep/board.c
+++ b/board/meep/board.c
@@ -89,18 +89,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/mushu/board.c b/board/mushu/board.c
index 02dd76f5d3..27d1ab4002 100644
--- a/board/mushu/board.c
+++ b/board/mushu/board.c
@@ -394,13 +394,11 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Temp1",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Temp2",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/nami/board.c b/board/nami/board.c
index 150def9d21..b6cbbd359d 100644
--- a/board/nami/board.c
+++ b/board/nami/board.c
@@ -360,11 +360,11 @@ uint16_t tcpc_get_alert_status(void)
*/
const struct temp_sensor_t temp_sensors[TEMP_SENSOR_COUNT] = {
{"F75303_Local", TEMP_SENSOR_TYPE_BOARD, f75303_get_val,
- F75303_IDX_LOCAL, 4},
+ F75303_IDX_LOCAL},
{"F75303_Remote1", TEMP_SENSOR_TYPE_CPU, f75303_get_val,
- F75303_IDX_REMOTE1, 4},
+ F75303_IDX_REMOTE1},
{"F75303_Remote2", TEMP_SENSOR_TYPE_BOARD, f75303_get_val,
- F75303_IDX_REMOTE2, 4},
+ F75303_IDX_REMOTE2},
};
struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT];
diff --git a/board/nautilus/board.c b/board/nautilus/board.c
index 774d92b6be..c9897212f8 100644
--- a/board/nautilus/board.c
+++ b/board/nautilus/board.c
@@ -257,13 +257,13 @@ uint16_t tcpc_get_alert_status(void)
}
const struct temp_sensor_t temp_sensors[] = {
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
/* These BD99992GW temp sensors are only readable in S0 */
{"Charger", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM1, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM1},
{"DRAM", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM2, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM2},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index afe0b3186d..9a397d1298 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -617,19 +617,19 @@ static int read_gyro_sensor_temp(int idx, int *temp_ptr)
}
const struct temp_sensor_t temp_sensors[] = {
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
/* These BD99992GW temp sensors are only readable in S0 */
{"Ambient", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM0, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM0},
{"Charger", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM1, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM1},
{"DRAM", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM2, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM2},
{"eMMC", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM3, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM3},
/* The Gyro temperature sensor is only readable in S0. */
- {"Gyro", TEMP_SENSOR_TYPE_BOARD, read_gyro_sensor_temp, LID_GYRO, 1}
+ {"Gyro", TEMP_SENSOR_TYPE_BOARD, read_gyro_sensor_temp, LID_GYRO}
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/oak/board.c b/board/oak/board.c
index f830aa646b..ec871824bc 100644
--- a/board/oak/board.c
+++ b/board/oak/board.c
@@ -177,13 +177,13 @@ const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
*/
const struct temp_sensor_t temp_sensors[] = {
{"TMP432_Internal", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_LOCAL, 4},
+ TMP432_IDX_LOCAL},
{"TMP432_Sensor_1", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE1, 4},
+ TMP432_IDX_REMOTE1},
{"TMP432_Sensor_2", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE2, 4},
+ TMP432_IDX_REMOTE2},
{"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp,
- 0, 4},
+ 0},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/phaser/board.c b/board/phaser/board.c
index f2d9636d1c..1dae01fc20 100644
--- a/board/phaser/board.c
+++ b/board/phaser/board.c
@@ -77,18 +77,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/poppy/board.c b/board/poppy/board.c
index 274af0ed0c..9ccd9774b4 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -344,17 +344,17 @@ uint16_t tcpc_get_alert_status(void)
}
const struct temp_sensor_t temp_sensors[] = {
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
/* These BD99992GW temp sensors are only readable in S0 */
{"Ambient", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM0, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM0},
{"Charger", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM1, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM1},
{"DRAM", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM2, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM2},
{"eMMC", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM3, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM3},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/puff/board.c b/board/puff/board.c
index ac0d40d8c4..4917432d6b 100644
--- a/board/puff/board.c
+++ b/board/puff/board.c
@@ -314,14 +314,12 @@ const struct temp_sensor_t temp_sensors[] = {
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
.idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1,
},
[TEMP_SENSOR_PP5000] = {
.name = "PP5000",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
.idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1,
},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/rammus/board.c b/board/rammus/board.c
index 9e7384e0fd..9ce61ef501 100644
--- a/board/rammus/board.c
+++ b/board/rammus/board.c
@@ -284,17 +284,17 @@ uint16_t tcpc_get_alert_status(void)
}
const struct temp_sensor_t temp_sensors[] = {
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
/* These BD99992GW temp sensors are only readable in S0 */
{"Ambient", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM0, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM0},
{"Charger", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM1, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM1},
{"DRAM", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM2, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM2},
{"eMMC", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val,
- BD99992GW_ADC_CHANNEL_SYSTHERM3, 4},
+ BD99992GW_ADC_CHANNEL_SYSTHERM3},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/reef/board.c b/board/reef/board.c
index 0534680743..0a9d453ce5 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -401,22 +401,18 @@ void board_tcpc_init(void)
DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_I2C+1);
const struct temp_sensor_t temp_sensors[] = {
- /* FIXME(dhendrix): tweak action_delay_sec */
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/reef_it8320/board.c b/board/reef_it8320/board.c
index 513861b9d8..c06ceaa87e 100644
--- a/board/reef_it8320/board.c
+++ b/board/reef_it8320/board.c
@@ -183,18 +183,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/reef_mchp/board.c b/board/reef_mchp/board.c
index 270b310a8a..89fc2ec139 100644
--- a/board/reef_mchp/board.c
+++ b/board/reef_mchp/board.c
@@ -634,10 +634,9 @@ int board_get_ambient_temp(int idx, int *temp_ptr)
* delay from read to taking action
*/
const struct temp_sensor_t temp_sensors[] = {
- /* FIXME(dhendrix): tweak action_delay_sec */
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 1},
- {"Ambient", TEMP_SENSOR_TYPE_BOARD, board_get_ambient_temp, 0, 5},
- {"Charger", TEMP_SENSOR_TYPE_BOARD, board_get_charger_temp, 1, 1},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
+ {"Ambient", TEMP_SENSOR_TYPE_BOARD, board_get_ambient_temp, 0},
+ {"Charger", TEMP_SENSOR_TYPE_BOARD, board_get_charger_temp, 1},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/samus/board.c b/board/samus/board.c
index 2ed4616c9f..7e76833241 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -175,21 +175,21 @@ BUILD_ASSERT(ARRAY_SIZE(tmp006_sensors) == TMP006_COUNT);
/* Temperature sensors data; must be in same order as enum temp_sensor_id. */
const struct temp_sensor_t temp_sensors[] = {
- {"PECI", TEMP_SENSOR_TYPE_CPU, peci_temp_sensor_get_val, 0, 2},
- {"ECInternal", TEMP_SENSOR_TYPE_BOARD, chip_temp_sensor_get_val, 0, 4},
- {"I2C-Charger-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 0, 7},
- {"I2C-Charger-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 1, 7},
- {"I2C-CPU-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 2, 7},
- {"I2C-CPU-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 3, 7},
- {"I2C-Left C-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 4, 7},
- {"I2C-Left C-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 5, 7},
- {"I2C-Right C-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 6, 7},
- {"I2C-Right C-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 7, 7},
- {"I2C-Right D-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 8, 7},
- {"I2C-Right D-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 9, 7},
- {"I2C-Left D-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 10, 7},
- {"I2C-Left D-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 11, 7},
- {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4},
+ {"PECI", TEMP_SENSOR_TYPE_CPU, peci_temp_sensor_get_val, 0},
+ {"ECInternal", TEMP_SENSOR_TYPE_BOARD, chip_temp_sensor_get_val, 0},
+ {"I2C-Charger-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 0},
+ {"I2C-Charger-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 1},
+ {"I2C-CPU-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 2},
+ {"I2C-CPU-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 3},
+ {"I2C-Left C-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 4},
+ {"I2C-Left C-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 5},
+ {"I2C-Right C-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 6},
+ {"I2C-Right C-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 7},
+ {"I2C-Right D-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 8},
+ {"I2C-Right D-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 9},
+ {"I2C-Left D-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 10},
+ {"I2C-Left D-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 11},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/strago/board.c b/board/strago/board.c
index 26e8eafab1..73f105cd24 100644
--- a/board/strago/board.c
+++ b/board/strago/board.c
@@ -161,13 +161,13 @@ const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT] = {
*/
const struct temp_sensor_t temp_sensors[] = {
{"TMP432_Internal", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_LOCAL, 4},
+ TMP432_IDX_LOCAL},
{"TMP432_Sensor_1", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE1, 4},
+ TMP432_IDX_REMOTE1},
{"TMP432_Sensor_2", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
- TMP432_IDX_REMOTE2, 4},
+ TMP432_IDX_REMOTE2},
{"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp,
- 0, 4},
+ 0},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/stryke/board.c b/board/stryke/board.c
index f7df3b6989..82deccbfe9 100644
--- a/board/stryke/board.c
+++ b/board/stryke/board.c
@@ -312,13 +312,11 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Temp1",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Temp2",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_2},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/waddledee/board.c b/board/waddledee/board.c
index 6a1a0989cf..ce9d4a8a6d 100644
--- a/board/waddledee/board.c
+++ b/board/waddledee/board.c
@@ -178,13 +178,11 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_1] = {.name = "Memory",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_1},
[TEMP_SENSOR_2] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_2},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/yorp/board.c b/board/yorp/board.c
index 9bbeb28726..0afa7ec06d 100644
--- a/board/yorp/board.c
+++ b/board/yorp/board.c
@@ -76,18 +76,15 @@ const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_BATTERY] = {.name = "Battery",
.type = TEMP_SENSOR_TYPE_BATTERY,
.read = charge_get_battery_temp,
- .idx = 0,
- .action_delay_sec = 1},
+ .idx = 0},
[TEMP_SENSOR_AMBIENT] = {.name = "Ambient",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
- .idx = ADC_TEMP_SENSOR_AMB,
- .action_delay_sec = 5},
+ .idx = ADC_TEMP_SENSOR_AMB},
[TEMP_SENSOR_CHARGER] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_13k7_47k_4050b,
- .idx = ADC_TEMP_SENSOR_CHARGER,
- .action_delay_sec = 1},
+ .idx = ADC_TEMP_SENSOR_CHARGER},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/include/temp_sensor.h b/include/temp_sensor.h
index 4c8cf88b20..f7b5371a1d 100644
--- a/include/temp_sensor.h
+++ b/include/temp_sensor.h
@@ -37,9 +37,6 @@ struct temp_sensor_t {
int (*read)(int idx, int *temp_ptr);
/* Index among the same kind of sensors. */
int idx;
- /* Delay between reading temperature and taking action about it,
- * in seconds. */
- int action_delay_sec;
};
#ifdef CONFIG_TEMP_SENSOR