diff options
author | Tristan Honscheid <honscheid@google.com> | 2021-11-04 16:57:54 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-09 21:29:49 +0000 |
commit | c5b31809cb024e89f51555943d34197ceb1640f1 (patch) | |
tree | 240eaed46671786edeef49780d9b1a67ef6c69a7 /driver | |
parent | 998bd68a7d018e4b610805e1b365eedecc425bbf (diff) | |
download | chrome-ec-c5b31809cb024e89f51555943d34197ceb1640f1.tar.gz |
zephyr: bmi160: Test interrupt handler and bug fix
Test the interrupt handler in the BMI160 driver. Also, correct an error
from an earlier CL (3229647) where I moved the BMI260 event flag in to
BMI160 driver's header.
BRANCH=None
BUG=b:184856157
TEST=zmake -D configure --test test-drivers
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Change-Id: Icb08d9e1142066ba0ef22b9633895e60e6b40e90
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262878
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/accelgyro_bmi160.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index ebcb6f71dc..08bd7a0445 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -28,23 +28,6 @@ #define CPRINTF(format, args...) cprintf(CC_ACCEL, format, ## args) #define CPRINTS(format, args...) cprints(CC_ACCEL, format, ## args) -#if defined(CONFIG_ZEPHYR) && defined(CONFIG_ACCEL_INTERRUPTS) -/* Get the motion sensor ID of the BMI160 sensor that generates the interrupt. - * The interrupt is converted to the event and transferred to motion sense task - * that actually handles the interrupt. - * - * Here we use an alias (bmi160_int) to get the motion sensor ID. This alias - * MUST be defined for this driver to work. - * aliases { - * bmi160-int = &base_accel; - * }; - */ -#if DT_NODE_EXISTS(DT_ALIAS(bmi160_int)) -#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ - TASK_EVENT_MOTION_SENSOR_INTERRUPT(SENSOR_ID(DT_ALIAS(bmi160_int))) -#endif -#endif - STATIC_IF(CONFIG_BMI_ORIENTATION_SENSOR) void irq_set_orientation( struct motion_sensor_t *s, int interrupt); |