ec/google/chromeec: Add ability to enable auto fan control via setup option

Allow enabling of automatic fan control via a setup option, while
preserving the functionality of the existing Kconfig symbol.

TEST=tested hooked up to a CFR option to toggle automatic fan control
at boot, with visibility controlled by fan presence, on a range of
ChromeOS devices with and without a PWM-controlled fan.

Change-Id: I0510c0d0bd79106036f77d59e04d455ee904ce6e
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89830
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Matt DeVillier 2025-10-29 18:59:46 -05:00
commit 1ca1dc6c31

View file

@ -1366,7 +1366,7 @@ void google_chromeec_init(void)
google_chromeec_log_uptimeinfo();
/* Enable automatic fan control */
if (CONFIG(EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL)) {
if (get_uint_option("auto_fan_control", CONFIG(EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL))) {
ec_cmd_thermal_auto_fan_ctrl(PLAT_EC);
}