diff options
Diffstat (limited to 'board/trembyle/board.c')
-rw-r--r-- | board/trembyle/board.c | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/board/trembyle/board.c b/board/trembyle/board.c index 89a62f3411..3e6a561dc6 100644 --- a/board/trembyle/board.c +++ b/board/trembyle/board.c @@ -447,29 +447,40 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -const static struct ec_thermal_config thermal_thermistor = { - .temp_host = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(90), - [EC_TEMP_THRESH_HALT] = C_TO_K(92), - }, - .temp_host_release = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(80), - }, - .temp_fan_off = C_TO_K(25), - .temp_fan_max = C_TO_K(58), -}; +/* + * TODO(b/202062363): Remove when clang is fixed. + */ +#define THERMAL_THERMISTOR \ + { \ + .temp_host = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(90), \ + [EC_TEMP_THRESH_HALT] = C_TO_K(92), \ + }, \ + .temp_host_release = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(80), \ + }, \ + .temp_fan_off = C_TO_K(25), \ + .temp_fan_max = C_TO_K(58), \ + } +__maybe_unused static const struct ec_thermal_config thermal_thermistor = + THERMAL_THERMISTOR; -const static struct ec_thermal_config thermal_cpu = { - .temp_host = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(90), - [EC_TEMP_THRESH_HALT] = C_TO_K(92), - }, - .temp_host_release = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(80), - }, - .temp_fan_off = C_TO_K(25), - .temp_fan_max = C_TO_K(58), -}; +/* + * TODO(b/202062363): Remove when clang is fixed. + */ +#define THERMAL_CPU \ + { \ + .temp_host = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(90), \ + [EC_TEMP_THRESH_HALT] = C_TO_K(92), \ + }, \ + .temp_host_release = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(80), \ + }, \ + .temp_fan_off = C_TO_K(25), \ + .temp_fan_max = C_TO_K(58), \ + } +__maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU; struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT]; |