diff options
author | Denis Brockus <dbrockus@google.com> | 2021-06-07 09:48:00 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-07 18:15:22 +0000 |
commit | 4df10f7b2b0e67d1c36bb69285436ec0d5e3fdfd (patch) | |
tree | 4276acbab14b79df5066770362347e14b0d6380d /driver/accel_lis2dw12.h | |
parent | 43fffb5b0292ee1c48015b04ea55793a140d8177 (diff) | |
download | chrome-ec-4df10f7b2b0e67d1c36bb69285436ec0d5e3fdfd.tar.gz |
zephyr: driver: add ST accel_lis2dw12
BUG=b:180980668,b:189857004
BRANCH=none
TEST=make buildall
TEST=zmake configure -b $PROJ_HAYATO
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ib743f0dbcc4a9731ccb575344413f161cd0dbba2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2944617
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'driver/accel_lis2dw12.h')
-rw-r--r-- | driver/accel_lis2dw12.h | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/driver/accel_lis2dw12.h b/driver/accel_lis2dw12.h index c1f70bc513..8e1c97464c 100644 --- a/driver/accel_lis2dw12.h +++ b/driver/accel_lis2dw12.h @@ -11,20 +11,8 @@ #ifndef __CROS_EC_ACCEL_LIS2DW12_H #define __CROS_EC_ACCEL_LIS2DW12_H -#include "driver/stm_mems_common.h" - -/* - * 7-bit address is 011000Xb. Where 'X' is determined - * by the voltage on the ADDR pin. - */ -#define LIS2DW12_ADDR0 0x18 -#define LIS2DW12_ADDR1 0x19 - -#define LIS2DWL_ADDR0_FLAGS 0x18 -#define LIS2DWL_ADDR1_FLAGS 0x19 - -#define LIS2DW12_EN_BIT 0x01 -#define LIS2DW12_DIS_BIT 0x00 +#include "driver/accel_lis2dw12_public.h" +#include "stm_mems_common.h" /* Who am I. */ #define LIS2DW12_WHO_AM_I_REG 0x0f @@ -174,12 +162,6 @@ enum lis2dw12_odr { LIS2DW12_ODR_LIST_NUM }; -/* Absolute Acc rate. */ -#define LIS2DW12_ODR_MIN_VAL 12500 -#define LIS2DW12_ODR_MAX_VAL \ - MOTION_MAX_SENSOR_FREQUENCY(1600000, LIS2DW12_ODR_MIN_VAL) - - /* Full scale range registers. */ #define LIS2DW12_FS_ADDR LIS2DW12_CTRL6_ADDR #define LIS2DW12_FS_MASK 0x30 @@ -224,8 +206,4 @@ enum lis2dw12_fs { */ #define LIS2DW12_RESOLUTION 14 -extern const struct accelgyro_drv lis2dw12_drv; - -void lis2dw12_interrupt(enum gpio_signal signal); - #endif /* __CROS_EC_ACCEL_LIS2DW12_H */ |