summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/Kconfig6
-rw-r--r--src/ec/google/chromeec/ec.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/Kconfig b/src/ec/google/chromeec/Kconfig
index fb93b5662e..3b0beda24e 100644
--- a/src/ec/google/chromeec/Kconfig
+++ b/src/ec/google/chromeec/Kconfig
@@ -206,4 +206,10 @@ config EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG
Fetch Second Source Factory Cache from CBI EEPROM and add it in the most significant
32 bits of firmware configuration.
+config EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL
+ depends on EC_GOOGLE_CHROMEEC
+ bool "Enable automatic fan control"
+ help
+ Put the fan in auto mode at boot.
+
source "src/ec/google/chromeec/*/Kconfig"
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index fbb0033d59..8fdfbfbb28 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -1181,6 +1181,11 @@ int google_chromeec_get_pd_port_caps(int port,
void google_chromeec_init(void)
{
google_chromeec_log_uptimeinfo();
+
+ /* Enable automatic fan control */
+ if (CONFIG(EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL)) {
+ ec_cmd_thermal_auto_fan_ctrl(PLAT_EC);
+ }
}
int google_ec_running_ro(void)