diff options
Diffstat (limited to 'board/brask/sensors.c')
-rw-r--r-- | board/brask/sensors.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/board/brask/sensors.c b/board/brask/sensors.c index 72b8297aa1..7071c89f54 100644 --- a/board/brask/sensors.c +++ b/board/brask/sensors.c @@ -85,26 +85,31 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); * 130 C. However, sensor is located next to DDR, so we need to use the lower * DDR temperature limit (85 C) */ -static const struct ec_thermal_config thermal_cpu = { - .temp_host = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(70), - [EC_TEMP_THRESH_HALT] = C_TO_K(80), - }, - .temp_host_release = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(65), - }, - .temp_fan_off = C_TO_K(35), - .temp_fan_max = C_TO_K(50), -}; +/* + * TODO(b/202062363): Remove when clang is fixed. + */ +#define THERMAL_CPU \ + { \ + .temp_host = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(70), \ + [EC_TEMP_THRESH_HALT] = C_TO_K(80), \ + }, \ + .temp_host_release = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(65), \ + }, \ + .temp_fan_off = C_TO_K(35), \ + .temp_fan_max = C_TO_K(50), \ + } +__maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU; /* * TODO(b/197478860): add the thermal sensor setting */ /* this should really be "const" */ struct ec_thermal_config thermal_params[] = { - [TEMP_SENSOR_1_CPU] = thermal_cpu, - [TEMP_SENSOR_2_CPU_VR] = thermal_cpu, - [TEMP_SENSOR_3_WIFI] = thermal_cpu, - [TEMP_SENSOR_4_DIMM] = thermal_cpu, + [TEMP_SENSOR_1_CPU] = THERMAL_CPU, + [TEMP_SENSOR_2_CPU_VR] = THERMAL_CPU, + [TEMP_SENSOR_3_WIFI] = THERMAL_CPU, + [TEMP_SENSOR_4_DIMM] = THERMAL_CPU, }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); |