diff options
author | Aseda Aboagye <aaboagye@google.com> | 2015-09-10 17:18:43 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-15 11:02:43 -0700 |
commit | 16a18a5e0eeaeebff5f4ab5c9363481f8d1426aa (patch) | |
tree | bb62d47ffad8c4f9f80a50c1a8bd3fd06788af4b /common | |
parent | 070a82524836efe44dc7e5908b9b0ba019996097 (diff) | |
download | chrome-ec-16a18a5e0eeaeebff5f4ab5c9363481f8d1426aa.tar.gz |
driver: Refactor Kionix Accelerometer drivers.
This commit adds a new basic driver for the Kionix KX022 Accelerometer.
Currently, the driver is capable of reading the sensor data and
manipulating its ODR, resolution, and range.
This sensor also has integrated support for Directional
Tap/Double-Tap(TM), however that functionality is not yet implemented in
the driver.
Lastly, since this accelerometer is very similar to the previous KXCJ9,
this commit tries to combine the drivers.
Note, the variant of the Kionix accelerometer MUST be specified in the
private data structure.
BUG=chrome-os-partner:43494
BRANCH=None
TEST=Build GLaDOS EC with driver enabled and verify that valid
accelerometer data is read, and that range, resolution, and odr can all
be modified.
TEST=Build samus EC image and verify that the lid still
works. Additionally, verify that I can change the odr, rate, and
resolution.
TEST=make buildall tests
Change-Id: I238ff1dc13f5342a93f8f701a0da85c52f25d214
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/299013
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/build.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/build.mk b/common/build.mk index 312797ce87..6c534cbbd6 100644 --- a/common/build.mk +++ b/common/build.mk @@ -12,6 +12,7 @@ common-y+=version.o printf.o queue.o queue_policies.o common-$(CONFIG_ACCELGYRO_BMI160)+=math_util.o common-$(CONFIG_ACCELGYRO_LSM6DS0)+=math_util.o common-$(CONFIG_ACCEL_KXCJ9)+=math_util.o +common-$(CONFIG_ACCEL_KX022)+=math_util.o common-$(CONFIG_ADC)+=adc.o common-$(CONFIG_ALS)+=als.o common-$(CONFIG_AP_HANG_DETECT)+=ap_hang_detect.o |