summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:02:12 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 18:40:38 +0000
commit5d575a59830cf03cb52f600434d808e45270eea1 (patch)
tree853582f587c8a51091c92f041e8e5610c240497d
parent63a35eb757486151f9a64fbc4e1bc6db5ac02ec4 (diff)
downloadchrome-ec-5d575a59830cf03cb52f600434d808e45270eea1.tar.gz
board/redrix/sensors.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I767ffd788ff072951f28734022c136e24828e1cb Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728861 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--board/redrix/sensors.c72
1 files changed, 30 insertions, 42 deletions
diff --git a/board/redrix/sensors.c b/board/redrix/sensors.c
index df0e94f518..f33b98efeb 100644
--- a/board/redrix/sensors.c
+++ b/board/redrix/sensors.c
@@ -57,17 +57,13 @@ static struct accelgyro_saved_data_t g_bma253_data;
static struct accelgyro_saved_data_t g_bma422_data;
static struct lsm6dsm_data lsm6dsm_data = LSM6DSM_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) } };
-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) } };
/* TCS3400 private data */
static struct als_drv_data_t g_tcs3400_data = {
@@ -291,38 +287,30 @@ DECLARE_HOOK(HOOK_INIT, board_sensors_init, HOOK_PRIO_INIT_I2C + 1);
/* Temperature sensor configuration */
const struct temp_sensor_t temp_sensors[] = {
- [TEMP_SENSOR_1_DDR] = {
- .name = "DDR",
- .type = TEMP_SENSOR_TYPE_BOARD,
- .read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_1_DDR
- },
- [TEMP_SENSOR_2_SOC] = {
- .name = "SOC",
- .type = TEMP_SENSOR_TYPE_BOARD,
- .read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_2_SOC
- },
- [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_4_REGULATOR] = {
- .name = "Regulator",
- .type = TEMP_SENSOR_TYPE_BOARD,
- .read = get_temp_3v3_30k9_47k_4050b,
- .idx = ADC_TEMP_SENSOR_4_REGULATOR
- },
+ [TEMP_SENSOR_1_DDR] = { .name = "DDR",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_1_DDR },
+ [TEMP_SENSOR_2_SOC] = { .name = "SOC",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_2_SOC },
+ [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_4_REGULATOR] = { .name = "Regulator",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_4_REGULATOR },
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
/*
* TODO(b/202062363): Remove when clang is fixed.
*/
-#define THERMAL_DDR \
- { \
+#define THERMAL_DDR \
+ { \
.temp_host = { \
[EC_TEMP_THRESH_HIGH] = C_TO_K(75), \
[EC_TEMP_THRESH_HALT] = C_TO_K(80), \
@@ -341,8 +329,8 @@ __maybe_unused static const struct ec_thermal_config thermal_ddr = THERMAL_DDR;
/*
* TODO(b/202062363): Remove when clang is fixed.
*/
-#define THERMAL_CPU \
- { \
+#define THERMAL_CPU \
+ { \
.temp_host = { \
[EC_TEMP_THRESH_HIGH] = C_TO_K(75), \
[EC_TEMP_THRESH_HALT] = C_TO_K(80), \
@@ -356,8 +344,8 @@ __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU;
/*
* TODO(b/202062363): Remove when clang is fixed.
*/
-#define THERMAL_CHARGER \
- { \
+#define THERMAL_CHARGER \
+ { \
.temp_host = { \
[EC_TEMP_THRESH_HIGH] = C_TO_K(80), \
[EC_TEMP_THRESH_HALT] = C_TO_K(85), \
@@ -372,8 +360,8 @@ __maybe_unused static const struct ec_thermal_config thermal_charger =
/*
* TODO(b/202062363): Remove when clang is fixed.
*/
-#define THERMAL_REGULATOR \
- { \
+#define THERMAL_REGULATOR \
+ { \
.temp_host = { \
[EC_TEMP_THRESH_HIGH] = C_TO_K(80), \
[EC_TEMP_THRESH_HALT] = C_TO_K(85), \