summaryrefslogtreecommitdiff
path: root/board/felwinter/sensors.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/felwinter/sensors.c')
-rw-r--r--board/felwinter/sensors.c60
1 files changed, 25 insertions, 35 deletions
diff --git a/board/felwinter/sensors.c b/board/felwinter/sensors.c
index fd3f721947..6b62f5f4d2 100644
--- a/board/felwinter/sensors.c
+++ b/board/felwinter/sensors.c
@@ -1,4 +1,4 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -46,18 +46,14 @@ K_MUTEX_DEFINE(g_base_accel_mutex);
static struct stprivate_data g_lis2dw12_data;
static struct lsm6dso_data lsm6dso_data;
-static const mat33_fp_t lid_standard_ref = {
- { FLOAT_TO_FP(1), 0, 0},
- { 0, FLOAT_TO_FP(1), 0},
- { 0, 0, FLOAT_TO_FP(1)}
-};
+static const mat33_fp_t lid_standard_ref = { { FLOAT_TO_FP(1), 0, 0 },
+ { 0, FLOAT_TO_FP(1), 0 },
+ { 0, 0, FLOAT_TO_FP(1) } };
/* TODO(b/184779743): verify orientation matrix */
-static const mat33_fp_t base_standard_ref = {
- { FLOAT_TO_FP(1), 0, 0},
- { 0, FLOAT_TO_FP(-1), 0},
- { 0, 0, FLOAT_TO_FP(-1)}
-};
+static const mat33_fp_t base_standard_ref = { { FLOAT_TO_FP(1), 0, 0 },
+ { 0, FLOAT_TO_FP(-1), 0 },
+ { 0, 0, FLOAT_TO_FP(-1) } };
struct motion_sensor_t motion_sensors[] = {
[LID_ACCEL] = {
@@ -146,24 +142,18 @@ DECLARE_HOOK(HOOK_INIT, baseboard_sensors_init, HOOK_PRIO_INIT_I2C + 1);
/* Temperature sensor configuration */
const struct temp_sensor_t temp_sensors[] = {
- [TEMP_SENSOR_1_DDR_SOC] = {
- .name = "DDR and SOC",
- .type = TEMP_SENSOR_TYPE_BOARD,
- .read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1_DDR_SOC
- },
- [TEMP_SENSOR_2_FAN] = {
- .name = "FAN",
- .type = TEMP_SENSOR_TYPE_BOARD,
- .read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2_FAN
- },
- [TEMP_SENSOR_3_CHARGER] = {
- .name = "Charger",
- .type = TEMP_SENSOR_TYPE_BOARD,
- .read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_3_CHARGER
- },
+ [TEMP_SENSOR_1_DDR_SOC] = { .name = "DDR and SOC",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_1_DDR_SOC },
+ [TEMP_SENSOR_2_FAN] = { .name = "FAN",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_2_FAN },
+ [TEMP_SENSOR_3_CHARGER] = { .name = "Charger",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_3_CHARGER },
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
@@ -177,8 +167,8 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
/*
* TODO(b/202062363): Remove when clang is fixed.
*/
-#define THERMAL_CPU \
- { \
+#define THERMAL_CPU \
+ { \
.temp_host = { \
[EC_TEMP_THRESH_HIGH] = C_TO_K(70), \
[EC_TEMP_THRESH_HALT] = C_TO_K(80), \
@@ -207,8 +197,8 @@ __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU;
/*
* TODO(b/202062363): Remove when clang is fixed.
*/
-#define THERMAL_FAN \
- { \
+#define THERMAL_FAN \
+ { \
.temp_host = { \
[EC_TEMP_THRESH_HIGH] = C_TO_K(60), \
[EC_TEMP_THRESH_HALT] = C_TO_K(70), \
@@ -221,8 +211,8 @@ __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU;
}
__maybe_unused static const struct ec_thermal_config thermal_fan = THERMAL_FAN;
-#define THERMAL_CHARGER \
- { \
+#define THERMAL_CHARGER \
+ { \
.temp_host = { \
[EC_TEMP_THRESH_HIGH] = C_TO_K(70), \
[EC_TEMP_THRESH_HALT] = C_TO_K(80), \