diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2018-09-04 10:10:04 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-05-28 21:30:31 +0000 |
commit | d18859bee6110f7039a3268858bb068f56c3a496 (patch) | |
tree | 312d5190bf4d21b3c61539d6a3a39c1c93d05dc6 /board | |
parent | 4d38da5f607f10e283b5c6e635877ea75890bbff (diff) | |
download | chrome-ec-d18859bee6110f7039a3268858bb068f56c3a496.tar.gz |
motion: Define macros for custom events
Define macros to define custom events used by sensor interrupt handlers.
Remove CONFIG_ for activity events.
BUG=none
BRANCH=none
TEST=compile, sensors work on eve.
Change-Id: I08ef6ed2a004466ebc5f7650d6952a150b9de713
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1272189
Reviewed-by: Jett Rink <jettrink@chromium.org>
(cherry picked from commit 4b9a3c0cc9cee9ed85ba18dd2f9c23e90ca051fc)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1631305
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Tested-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/aleena/board.h | 3 | ||||
-rw-r--r-- | board/ampton/board.h | 6 | ||||
-rw-r--r-- | board/atlas/board.h | 3 | ||||
-rw-r--r-- | board/bloog/board.h | 4 | ||||
-rw-r--r-- | board/bobba/board.h | 7 | ||||
-rw-r--r-- | board/cheza/board.h | 3 | ||||
-rw-r--r-- | board/coral/board.h | 3 | ||||
-rw-r--r-- | board/eve/board.h | 7 | ||||
-rw-r--r-- | board/fleex/board.h | 3 | ||||
-rw-r--r-- | board/grunt/board.h | 3 | ||||
-rw-r--r-- | board/kukui/board.h | 6 | ||||
-rw-r--r-- | board/meep/board.h | 4 | ||||
-rw-r--r-- | board/nami/board.h | 3 | ||||
-rw-r--r-- | board/nautilus/board.h | 3 | ||||
-rw-r--r-- | board/nocturne/board.h | 6 | ||||
-rw-r--r-- | board/phaser/board.h | 3 | ||||
-rw-r--r-- | board/poppy/board.h | 3 | ||||
-rw-r--r-- | board/rainier/board.h | 3 | ||||
-rw-r--r-- | board/rammus/board.h | 3 | ||||
-rw-r--r-- | board/reef/board.h | 3 | ||||
-rw-r--r-- | board/reef_mchp/board.h | 3 | ||||
-rw-r--r-- | board/samus/board.h | 2 | ||||
-rw-r--r-- | board/scarlet/board.h | 6 | ||||
-rw-r--r-- | board/yorp/board.h | 4 |
24 files changed, 62 insertions, 32 deletions
diff --git a/board/aleena/board.h b/board/aleena/board.h index aeb75404a6..e92d518ab5 100644 --- a/board/aleena/board.h +++ b/board/aleena/board.h @@ -31,7 +31,8 @@ /* Motion sensing drivers */ #define CONFIG_ACCELGYRO_BMI160 -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCEL_KX022 #define CONFIG_CMD_ACCELS diff --git a/board/ampton/board.h b/board/ampton/board.h index bc4132385e..e8e253a1ef 100644 --- a/board/ampton/board.h +++ b/board/ampton/board.h @@ -53,8 +53,10 @@ #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL #define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(1 << 2) -#define CONFIG_SYNC_INT_EVENT TASK_EVENT_CUSTOM(1 << 3) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) +#define CONFIG_SYNC_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC) #ifndef __ASSEMBLER__ diff --git a/board/atlas/board.h b/board/atlas/board.h index bebf4444c8..009b78d609 100644 --- a/board/atlas/board.h +++ b/board/atlas/board.h @@ -124,7 +124,8 @@ #define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3) #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCELGYRO_BMI160 -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) /* USB */ #define CONFIG_USB_PD_ALT_MODE diff --git a/board/bloog/board.h b/board/bloog/board.h index 4950fc007a..a4769157c4 100644 --- a/board/bloog/board.h +++ b/board/bloog/board.h @@ -50,7 +50,9 @@ #define CONFIG_LED_ONOFF_STATES_BAT_LOW 10 -#define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCEL_LSM6DSM_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) + #ifndef __ASSEMBLER__ #include "gpio_signal.h" diff --git a/board/bobba/board.h b/board/bobba/board.h index bd5d06a594..694e248f73 100644 --- a/board/bobba/board.h +++ b/board/bobba/board.h @@ -34,8 +34,11 @@ #define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) /* Motion Sense Task Events */ -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(1 << 2) -#define CONFIG_SYNC_INT_EVENT TASK_EVENT_CUSTOM(1 << 3) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) + +#define CONFIG_SYNC_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC) #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_UPDATE diff --git a/board/cheza/board.h b/board/cheza/board.h index dfdb6e92f4..72ba9d3151 100644 --- a/board/cheza/board.h +++ b/board/cheza/board.h @@ -128,7 +128,8 @@ /* Sensors */ #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) #define CONFIG_ACCEL_FIFO 512 #define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3) #define CONFIG_CMD_ACCELS diff --git a/board/coral/board.h b/board/coral/board.h index 5a60c51aea..db16a7d538 100644 --- a/board/coral/board.h +++ b/board/coral/board.h @@ -197,7 +197,8 @@ #define CONFIG_MKBP_USE_HOST_EVENT #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_MAG_CALIBRATE #define CONFIG_ACCEL_KX022 #define CONFIG_LID_ANGLE diff --git a/board/eve/board.h b/board/eve/board.h index 98f1429fac..8b43e0eef1 100644 --- a/board/eve/board.h +++ b/board/eve/board.h @@ -117,7 +117,8 @@ #define CONFIG_MKBP_USE_HOST_EVENT #define CONFIG_ACCEL_KXCJ9 #define CONFIG_ALS_SI114X 0x40 -#define CONFIG_ALS_SI114X_INT_EVENT TASK_EVENT_CUSTOM(8) +#define CONFIG_ALS_SI114X_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_LIGHT) #define CONFIG_ALS_SI114X_POLLING #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_BD99992GW @@ -125,7 +126,8 @@ #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_MAG_BMI160_BMM150 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_ACCELGYRO_SEC_ADDR BMM150_ADDR0 /* 8-bit address */ #define CONFIG_MAG_CALIBRATE #define CONFIG_LID_ANGLE @@ -148,7 +150,6 @@ #define CONFIG_GESTURE_TAP_MAX_INTERSTICE_T 500 #define CONFIG_GESTURE_DETECTION_MASK \ (1 << CONFIG_GESTURE_SENSOR_BATTERY_TAP) -#define CONFIG_GESTURE_TAP_EVENT TASK_EVENT_CUSTOM(1024) /* USB */ #define CONFIG_USB_CHARGER diff --git a/board/fleex/board.h b/board/fleex/board.h index 78815f7496..28504a7f5f 100644 --- a/board/fleex/board.h +++ b/board/fleex/board.h @@ -42,7 +42,8 @@ #define CONFIG_STEINHART_HART_3V3_13K7_47K_4050B #define CONFIG_STEINHART_HART_3V3_51K1_47K_4050B -#define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCEL_LSM6DSM_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #ifndef __ASSEMBLER__ #include "gpio_signal.h" diff --git a/board/grunt/board.h b/board/grunt/board.h index c4a27ad4d9..289091eb0b 100644 --- a/board/grunt/board.h +++ b/board/grunt/board.h @@ -45,7 +45,8 @@ /* Motion sensing drivers */ #define CONFIG_ACCELGYRO_BMI160 -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCEL_KX022 #define CONFIG_CMD_ACCELS diff --git a/board/kukui/board.h b/board/kukui/board.h index 1a79d5118b..c0ff9efcb7 100644 --- a/board/kukui/board.h +++ b/board/kukui/board.h @@ -96,12 +96,14 @@ #define CONFIG_MAG_CALIBRATE #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) /* Camera VSYNC */ #define CONFIG_SYNC #define CONFIG_SYNC_COMMAND -#define CONFIG_SYNC_INT_EVENT TASK_EVENT_CUSTOM(5) +#define CONFIG_SYNC_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC) #endif /* SECTION_IS_RW */ /* To be able to indicate the device is in tablet mode. */ diff --git a/board/meep/board.h b/board/meep/board.h index 5ad10f1d72..14b9b2d376 100644 --- a/board/meep/board.h +++ b/board/meep/board.h @@ -47,7 +47,9 @@ #define CONFIG_LED_ONOFF_STATES_BAT_LOW 10 -#define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCEL_LSM6DSM_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) + #ifndef __ASSEMBLER__ #include "gpio_signal.h" diff --git a/board/nami/board.h b/board/nami/board.h index ab11a95cee..0c88875e2f 100644 --- a/board/nami/board.h +++ b/board/nami/board.h @@ -132,7 +132,8 @@ #define CONFIG_MKBP_EVENT #define CONFIG_MKBP_USE_HOST_EVENT #define CONFIG_ACCELGYRO_BMI160 -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT #define CONFIG_ACCEL_BMA255 #define CONFIG_ACCEL_KX022 diff --git a/board/nautilus/board.h b/board/nautilus/board.h index c64a33a724..acbed5897e 100644 --- a/board/nautilus/board.h +++ b/board/nautilus/board.h @@ -113,7 +113,8 @@ #define CONFIG_MKBP_EVENT #define CONFIG_MKBP_USE_HOST_EVENT #define CONFIG_ACCELGYRO_BMI160 -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT #define CONFIG_ACCEL_BMA255 #define CONFIG_ACCEL_INTERRUPTS diff --git a/board/nocturne/board.h b/board/nocturne/board.h index fcd9adb5fd..4222ff6f9a 100644 --- a/board/nocturne/board.h +++ b/board/nocturne/board.h @@ -97,9 +97,11 @@ #define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3) #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCELGYRO_BMI160 -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) #define CONFIG_SYNC -#define CONFIG_SYNC_INT_EVENT TASK_EVENT_CUSTOM(8) +#define CONFIG_SYNC_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC) #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_BD99992GW #define CONFIG_THERMISTOR_NCP15WB diff --git a/board/phaser/board.h b/board/phaser/board.h index cd26cb4f88..6a10f7e8bf 100644 --- a/board/phaser/board.h +++ b/board/phaser/board.h @@ -40,7 +40,8 @@ #define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL #define CONFIG_DYNAMIC_MOTION_SENSOR_COUNT -#define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCEL_LSM6DSM_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #ifndef __ASSEMBLER__ diff --git a/board/poppy/board.h b/board/poppy/board.h index cf030f0c91..92d15ce0f7 100644 --- a/board/poppy/board.h +++ b/board/poppy/board.h @@ -126,7 +126,8 @@ #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_MAG_BMI160_BMM150 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) #define CONFIG_ACCELGYRO_SEC_ADDR BMM150_ADDR0 /* 8-bit address */ #define CONFIG_MAG_CALIBRATE /* Lower maximal ODR to 100Hz */ diff --git a/board/rainier/board.h b/board/rainier/board.h index 7c56a8c2c7..89d445c416 100644 --- a/board/rainier/board.h +++ b/board/rainier/board.h @@ -69,7 +69,8 @@ /* Motion Sensors */ #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) #define CONFIG_BARO_BMP280 /* To be able to indicate the device is in tablet mode. */ diff --git a/board/rammus/board.h b/board/rammus/board.h index dec50b87d1..adeaa259b1 100644 --- a/board/rammus/board.h +++ b/board/rammus/board.h @@ -114,7 +114,8 @@ #define CONFIG_MKBP_EVENT #define CONFIG_MKBP_USE_HOST_EVENT #define CONFIG_ACCELGYRO_BMI160 -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT #define CONFIG_ACCEL_BMA255 #define CONFIG_ACCEL_INTERRUPTS diff --git a/board/reef/board.h b/board/reef/board.h index 83facd8c04..b166d24c8b 100644 --- a/board/reef/board.h +++ b/board/reef/board.h @@ -193,7 +193,8 @@ #define CONFIG_MKBP_USE_HOST_EVENT #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_MAG_BMI160_BMM150 #define CONFIG_ACCELGYRO_SEC_ADDR BMM150_ADDR0 /* 8-bit address */ #define CONFIG_MAG_CALIBRATE diff --git a/board/reef_mchp/board.h b/board/reef_mchp/board.h index 7b6cdfbbe8..1250689d0d 100644 --- a/board/reef_mchp/board.h +++ b/board/reef_mchp/board.h @@ -200,7 +200,8 @@ #define CONFIG_MKBP_USE_HOST_EVENT #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_MAG_BMI160_BMM150 #define CONFIG_ACCELGYRO_SEC_ADDR BMM150_ADDR0 /* 8-bit address */ #define CONFIG_MAG_CALIBRATE diff --git a/board/samus/board.h b/board/samus/board.h index 1a5e11667f..59c3e8ca4d 100644 --- a/board/samus/board.h +++ b/board/samus/board.h @@ -214,8 +214,6 @@ void set_pp5000_in_g3(int mask, int enable); #define CONFIG_GESTURE_TAP_INNER_WINDOW_T 30 #define CONFIG_GESTURE_TAP_MIN_INTERSTICE_T 120 #define CONFIG_GESTURE_TAP_MAX_INTERSTICE_T 500 -/* event 2 to 9 are reserved for hardware interrupt */ -#define CONFIG_GESTURE_TAP_EVENT TASK_EVENT_CUSTOM(1024) #define CONFIG_LID_ANGLE_SENSOR_BASE 0 #define CONFIG_LID_ANGLE_SENSOR_LID 1 diff --git a/board/scarlet/board.h b/board/scarlet/board.h index 1d7e8203de..fdb262ad63 100644 --- a/board/scarlet/board.h +++ b/board/scarlet/board.h @@ -86,12 +86,14 @@ /* Motion Sensors */ #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) /* Camera VSYNC */ #define CONFIG_SYNC #define CONFIG_SYNC_COMMAND -#define CONFIG_SYNC_INT_EVENT TASK_EVENT_CUSTOM(5) +#define CONFIG_SYNC_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC) /* To be able to indicate the device is in tablet mode. */ #define CONFIG_TABLET_MODE diff --git a/board/yorp/board.h b/board/yorp/board.h index b84785c7bd..5a1e152b2a 100644 --- a/board/yorp/board.h +++ b/board/yorp/board.h @@ -39,7 +39,9 @@ #define CONFIG_STEINHART_HART_3V3_13K7_47K_4050B #define CONFIG_STEINHART_HART_3V3_51K1_47K_4050B -#define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCEL_LSM6DSM_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) + #ifndef __ASSEMBLER__ #include "gpio_signal.h" |