summaryrefslogtreecommitdiff
path: root/driver/accel_bma2x2.h
diff options
context:
space:
mode:
authorHyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com>2021-01-19 09:24:34 -0800
committerCommit Bot <commit-bot@chromium.org>2021-01-20 20:12:17 +0000
commit6a87ebfedddef0a3d0438bcbb894e45dc16fe1e1 (patch)
tree85cf0cda8fb472011d80693008f5041c8058988d /driver/accel_bma2x2.h
parent0fb58a57bbbc94391eb56120498dc796edea2ed9 (diff)
downloadchrome-ec-6a87ebfedddef0a3d0438bcbb894e45dc16fe1e1.tar.gz
Zephyr: Create public headers for bmi260, bma2x2, and tcs3400
Separate out the public part of sensor headers so it can be included from Zephyr. BUG=b:175434113 BRANCH=none TEST=make buildall -j8 build volteer on zephyr Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> Change-Id: I899e9aea99d6c7d56a1b6735538b280fe0735313 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2637251 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'driver/accel_bma2x2.h')
-rw-r--r--driver/accel_bma2x2.h36
1 files changed, 1 insertions, 35 deletions
diff --git a/driver/accel_bma2x2.h b/driver/accel_bma2x2.h
index 67228ab35d..37f7bd2062 100644
--- a/driver/accel_bma2x2.h
+++ b/driver/accel_bma2x2.h
@@ -8,31 +8,7 @@
#ifndef __CROS_EC_ACCEL_BMA2x2_H
#define __CROS_EC_ACCEL_BMA2x2_H
-extern const struct accelgyro_drv bma2x2_accel_drv;
-
-/* I2C ADDRESS DEFINITIONS */
-/* The following definition of I2C address is used for the following sensors
-* BMA253
-* BMA255
-* BMA355
-* BMA280
-* BMA282
-* BMA223
-* BMA254
-* BMA284
-* BMA250E
-* BMA222E
-*/
-#define BMA2x2_I2C_ADDR1_FLAGS 0x18
-#define BMA2x2_I2C_ADDR2_FLAGS 0x19
-
-/* The following definition of I2C address is used for the following sensors
-* BMC150
-* BMC056
-* BMC156
-*/
-#define BMA2x2_I2C_ADDR3_FLAGS 0x10
-#define BMA2x2_I2C_ADDR4_FLAGS 0x11
+#include "accel_bma2x2_public.h"
/*** Chip-specific registers ***/
/* REGISTER ADDRESS DEFINITIONS */
@@ -161,14 +137,4 @@ extern const struct accelgyro_drv bma2x2_accel_drv;
/* Sensor resolution in number of bits. This sensor has fixed resolution. */
#define BMA2x2_RESOLUTION 12
-/*
- * Min and Max sampling frequency in mHz.
- * Given BMA255 is polled, we limit max frequency to 125Hz.
- * If set to 250Hz, given we can read up to 3ms before the due time
- * (see CONFIG_MOTION_MIN_SENSE_WAIT_TIME), we may read too early when
- * other sensors are active.
- */
-#define BMA255_ACCEL_MIN_FREQ 7810
-#define BMA255_ACCEL_MAX_FREQ \
- MOTION_MAX_SENSOR_FREQUENCY(125000, 15625)
#endif /* __CROS_EC_ACCEL_BMA2x2_H */