diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2016-09-08 12:50:44 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-09 12:33:25 -0700 |
commit | 76e66c04f3add770f2a21b76277a65c6e70f7ccb (patch) | |
tree | 66fc04b39f254344f5a2fe498a1346c88271f09e | |
parent | 80ebfc9f44f2c22c855371b077738285f998ca63 (diff) | |
download | chrome-ec-76e66c04f3add770f2a21b76277a65c6e70f7ccb.tar.gz |
motion: remove accel_int_xxx, dead code
Remove code to set interrupt threshold, unused and broken.
BUG=chromium:426659
BRANCH=kevin
TEST=compile
Change-Id: I11362d3f7131bfe9849be26edeaeb768463c0c7f
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/382675
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | common/motion_sense.c | 50 | ||||
-rw-r--r-- | include/motion_sense.h | 16 |
2 files changed, 0 insertions, 66 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c index 12e6d3ca2b..369ef730a9 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -1479,56 +1479,6 @@ DECLARE_CONSOLE_COMMAND(accelinfo, command_display_accel_info, " and set calculation frequency."); #endif /* CONFIG_CMD_ACCEL_INFO */ -#ifdef CONFIG_ACCEL_INTERRUPTS -/* TODO(crosbug.com/p/426659): this code is broken, does not with ST sensors. */ -void accel_int_lid(enum gpio_signal signal) -{ - /* - * Print statement is here for testing with console accelint command. - * Remove print statement when interrupt is used for real. - */ - CPRINTS("Accelerometer wake-up interrupt occurred on lid"); -} - -void accel_int_base(enum gpio_signal signal) -{ - /* - * Print statement is here for testing with console accelint command. - * Remove print statement when interrupt is used for real. - */ - CPRINTS("Accelerometer wake-up interrupt occurred on base"); -} - -static int command_accelerometer_interrupt(int argc, char **argv) -{ - char *e; - int id, thresh; - struct motion_sensor_t *sensor; - - if (argc != 3) - return EC_ERROR_PARAM_COUNT; - - /* First argument is id. */ - id = strtoi(argv[1], &e, 0); - if (*e || id < 0 || id >= motion_sensor_count) - return EC_ERROR_PARAM1; - - sensor = &motion_sensors[id]; - - /* Second argument is interrupt threshold. */ - thresh = strtoi(argv[2], &e, 0); - if (*e) - return EC_ERROR_PARAM2; - - sensor->drv->set_interrupt(sensor, thresh); - - return EC_SUCCESS; -} -DECLARE_CONSOLE_COMMAND(accelint, command_accelerometer_interrupt, - "id threshold", - "Write interrupt threshold"); -#endif /* CONFIG_ACCEL_INTERRUPTS */ - #ifdef CONFIG_ACCEL_FIFO static int motion_sense_read_fifo(int argc, char **argv) { diff --git a/include/motion_sense.h b/include/motion_sense.h index 2aea41a698..98c27ae04d 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -149,22 +149,6 @@ extern unsigned int motion_min_interval; */ #define MOTION_SENSE_HOOK_PRIO (HOOK_PRIO_DEFAULT) -#ifdef CONFIG_ACCEL_INTERRUPTS -/** - * Interrupt function for lid accelerometer. - * - * @param signal GPIO signal that caused interrupt - */ -void accel_int_lid(enum gpio_signal signal); - -/** - * Interrupt function for base accelerometer. - * - * @param signal GPIO signal that caused interrupt - */ -void accel_int_base(enum gpio_signal signal); -#endif - #ifdef CONFIG_ACCEL_FIFO extern struct queue motion_sense_fifo; |