diff options
author | Paul Ma <magf@bitland.corp-partner.google.com> | 2019-08-06 16:59:49 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-21 05:46:30 +0000 |
commit | a29f68a815b8e0ddb472c2cc812d6b18ac4b8c74 (patch) | |
tree | 9b20c9be82c45c8a0d1b52372bb523bf74320187 /include/motion_sense.h | |
parent | 74f268374972bdc8bd6c2a5c412d31edafa812b1 (diff) | |
download | chrome-ec-a29f68a815b8e0ddb472c2cc812d6b18ac4b8c74.tar.gz |
driver: lis2dwl: add driver support
lis2dwl has almost the same register interface as lis2dw12.
lis2dwl only has one low power mode and when in low power mode, it
has only 12 bit resolution. In order to get 14 bit resolution, we
only use its high performance mode.
Add MOTIONSENSE_FLAG_INT_ACTIVE_HIGH flag to support both active
high and active low interrupt.
BUG=b:138768226, b:138978278
BRANCH=none
TEST=use Akemi board, add lis2dwl as accel sensor, boot the board
and make sure sensor x/y/z get correct value by 'accelinfo on'
Cq-Depend: chromium:515302
Change-Id: I37fcc0f43af3c8055079e09db00757b665813ba8
Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1739026
Tested-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: mario tesi <mario.tesi@st.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r-- | include/motion_sense.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index f6abf8949c..8c3f0cdbde 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -130,8 +130,9 @@ struct motion_data_t { * When set, spoof mode will allow the EC to report arbitrary values for any of * the components. */ -#define MOTIONSENSE_FLAG_IN_SPOOF_MODE BIT(1) -#define MOTIONSENSE_FLAG_INT_SIGNAL BIT(2) +#define MOTIONSENSE_FLAG_IN_SPOOF_MODE BIT(1) +#define MOTIONSENSE_FLAG_INT_SIGNAL BIT(2) +#define MOTIONSENSE_FLAG_INT_ACTIVE_HIGH BIT(3) struct motion_sensor_t { /* RO fields */ |