summaryrefslogtreecommitdiff
path: root/board/voxel/sensors.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/voxel/sensors.c')
-rw-r--r--board/voxel/sensors.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/board/voxel/sensors.c b/board/voxel/sensors.c
index ac444ad840..c3c074da9d 100644
--- a/board/voxel/sensors.c
+++ b/board/voxel/sensors.c
@@ -1,4 +1,4 @@
-/* Copyright 2020 The Chromium OS Authors. All rights reserved.
+/* Copyright 2020 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -25,7 +25,7 @@
#include "tablet_mode.h"
#include "util.h"
-#define CPRINTS(format, args...) cprints(CC_MOTION_SENSE, format, ## args)
+#define CPRINTS(format, args...) cprints(CC_MOTION_SENSE, format, ##args)
/******************************************************************************/
/* Sensors */
static struct mutex g_lid_accel_mutex;
@@ -40,23 +40,17 @@ static struct bmi_drv_data_t g_bmi160_data;
static struct icm_drv_data_t g_icm426xx_data;
/* Rotation matrix for the lid accelerometer */
-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) } };
-const mat33_fp_t base_standard_ref = {
- { 0, FLOAT_TO_FP(1), 0},
- { FLOAT_TO_FP(-1), 0, 0},
- { 0, 0, FLOAT_TO_FP(1)}
-};
+const mat33_fp_t base_standard_ref = { { 0, FLOAT_TO_FP(1), 0 },
+ { FLOAT_TO_FP(-1), 0, 0 },
+ { 0, 0, FLOAT_TO_FP(1) } };
-static const mat33_fp_t base_icm_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_icm_ref = { { FLOAT_TO_FP(1), 0, 0 },
+ { 0, FLOAT_TO_FP(1), 0 },
+ { 0, 0, FLOAT_TO_FP(1) } };
struct motion_sensor_t kx022_lid_accel = {
.name = "Lid Accel",
@@ -283,8 +277,7 @@ static void board_sensors_init(void)
motion_sensor_count = 0;
gmr_tablet_switch_disable();
/* Base accel is not stuffed, don't allow line to float */
- gpio_set_flags(GPIO_EC_IMU_INT_L,
- GPIO_INPUT | GPIO_PULL_DOWN);
+ gpio_set_flags(GPIO_EC_IMU_INT_L, GPIO_INPUT | GPIO_PULL_DOWN);
}
}
DECLARE_HOOK(HOOK_INIT, board_sensors_init, HOOK_PRIO_DEFAULT);