summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2021-10-01 11:41:21 +0800
committerCommit Bot <commit-bot@chromium.org>2021-10-07 08:15:31 +0000
commit2755bf9aa282d6d261c2b65d593e1420c7ca5f63 (patch)
treedcee383cdbd506e96b2581e56632b485f36b584e
parent2259b3526def9f0a0d63e5f6d8d1a29b9eb65774 (diff)
downloadchrome-ec-2755bf9aa282d6d261c2b65d593e1420c7ca5f63.tar.gz
anahera: Correct thermal sensor name
This patch corrects the ADC0 channel thermistor name to FAN which is closed to FAN. BUG=b:199246802 BRANCH=none TEST=EC console "temps" on Anahera. 21-10-01 11:38:55.054 Fan : 320 K = 47 C 80% 21-10-01 11:38:55.057 SOC : 318 K = 45 C 66% 21-10-01 11:38:55.061 Charger : 328 K = 55 C 100% 21-10-01 11:38:55.066 Regulator : 309 K = 36 C 0% Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I3b8cdc14f509af83ea19588823f06b23454afd9a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3197898 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
-rw-r--r--board/anahera/board.h4
-rw-r--r--board/anahera/sensors.c22
2 files changed, 13 insertions, 13 deletions
diff --git a/board/anahera/board.h b/board/anahera/board.h
index c2a2c09796..404482596b 100644
--- a/board/anahera/board.h
+++ b/board/anahera/board.h
@@ -151,7 +151,7 @@
#include "usbc_config.h"
enum adc_channel {
- ADC_TEMP_SENSOR_1_DDR,
+ ADC_TEMP_SENSOR_1_FAN,
ADC_TEMP_SENSOR_2_SOC,
ADC_TEMP_SENSOR_3_CHARGER,
ADC_TEMP_SENSOR_4_REGULATOR,
@@ -159,7 +159,7 @@ enum adc_channel {
};
enum temp_sensor_id {
- TEMP_SENSOR_1_DDR,
+ TEMP_SENSOR_1_FAN,
TEMP_SENSOR_2_SOC,
TEMP_SENSOR_3_CHARGER,
TEMP_SENSOR_4_REGULATOR,
diff --git a/board/anahera/sensors.c b/board/anahera/sensors.c
index 43fc7ef045..bb86af940b 100644
--- a/board/anahera/sensors.c
+++ b/board/anahera/sensors.c
@@ -11,8 +11,8 @@
/* ADC configuration */
const struct adc_t adc_channels[] = {
- [ADC_TEMP_SENSOR_1_DDR] = {
- .name = "TEMP_DDR",
+ [ADC_TEMP_SENSOR_1_FAN] = {
+ .name = "TEMP_FAN",
.input_ch = NPCX_ADC_CH0,
.factor_mul = ADC_MAX_VOLT,
.factor_div = ADC_READ_MAX + 1,
@@ -44,11 +44,11 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
/* Temperature sensor configuration */
const struct temp_sensor_t temp_sensors[] = {
- [TEMP_SENSOR_1_DDR] = {
- .name = "DDR",
+ [TEMP_SENSOR_1_FAN] = {
+ .name = "Fan",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1_DDR
+ .idx = ADC_TEMP_SENSOR_1_FAN
},
[TEMP_SENSOR_2_SOC] = {
.name = "SOC",
@@ -72,9 +72,9 @@ const struct temp_sensor_t temp_sensors[] = {
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
/*
- * TODO(b/195673113): Need to update for Alder Lake/redrix
+ * TODO(b/199246802): Need to update for Alder Lake/anahera
*/
-static const struct ec_thermal_config thermal_ddr = {
+static const struct ec_thermal_config thermal_fan = {
.temp_host = {
[EC_TEMP_THRESH_HIGH] = C_TO_K(70),
[EC_TEMP_THRESH_HALT] = C_TO_K(80),
@@ -87,7 +87,7 @@ static const struct ec_thermal_config thermal_ddr = {
};
/*
- * TODO(b/195673113): Need to update for Alder Lake/redrix
+ * TODO(b/199246802): Need to update for Alder Lake/anahera
*
* Tiger Lake specifies 100 C as maximum TDP temperature. THRMTRIP# occurs at
* 130 C. However, sensor is located next to SOC, so we need to use the lower
@@ -106,7 +106,7 @@ static const struct ec_thermal_config thermal_cpu = {
};
/*
- * TODO(b/195673113): Need to update for Alder Lake/redrix
+ * TODO(b/199246802): Need to update for Alder Lake/anahera
*/
static const struct ec_thermal_config thermal_charger = {
.temp_host = {
@@ -121,7 +121,7 @@ static const struct ec_thermal_config thermal_charger = {
};
/*
- * TODO(b/195673113): Need to update for Alder Lake/redrix
+ * TODO(b/199246802): Need to update for Alder Lake/anahera
*/
static const struct ec_thermal_config thermal_regulator = {
.temp_host = {
@@ -137,7 +137,7 @@ static const struct ec_thermal_config thermal_regulator = {
/* this should really be "const" */
struct ec_thermal_config thermal_params[] = {
- [TEMP_SENSOR_1_DDR] = thermal_ddr,
+ [TEMP_SENSOR_1_FAN] = thermal_fan,
[TEMP_SENSOR_2_SOC] = thermal_cpu,
[TEMP_SENSOR_3_CHARGER] = thermal_charger,
[TEMP_SENSOR_4_REGULATOR] = thermal_regulator,