diff options
author | Jonathan Brandmeyer <jbrandmeyer@chromium.org> | 2018-10-04 10:19:57 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-04 17:09:13 -0700 |
commit | 634494ec964ac288222e7cd85f83d55a64aca7a1 (patch) | |
tree | bcc1d2bfa8c5876da2175b64fc3e0a677444bc96 /board | |
parent | ce110598773fca8ef888e3a40f3e433da78e75a7 (diff) | |
download | chrome-ec-634494ec964ac288222e7cd85f83d55a64aca7a1.tar.gz |
careena, liara, aleena: Remove motion sensing support
These members of the grunt family do not include any motion sensors.
Remove them entirely, both to save space and to disable some factory
tests.
build/aleena/RW/space_free_flash grew by 12716 bytes: (62400 to 75116)
build/aleena/RW/space_free_ram grew by 9888 bytes: (30272 to 40160)
build/careena/RW/space_free_flash grew by 12864 bytes: (61664 to 74528)
build/careena/RW/space_free_ram grew by 9856 bytes: (30304 to 40160)
build/liara/RW/space_free_flash grew by 12724 bytes: (61364 to 74088)
build/liara/RW/space_free_ram grew by 9856 bytes: (30272 to 40128)
BRANCH=grunt
BUG=b:115649135
TEST=boot Careena. Observe that `ectool motionsense` returns an INVALID
COMMAND error, and that the EC console shows no attempt is made to
communicate with the sensors.
Change-Id: I322978fc80e36b999e77f9e3d54b175c6814fdcf
Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1262099
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/aleena/board.c | 6 | ||||
-rw-r--r-- | board/aleena/ec.tasklist | 1 | ||||
-rw-r--r-- | board/aleena/gpio.inc | 1 | ||||
-rw-r--r-- | board/careena/board.c | 6 | ||||
-rw-r--r-- | board/careena/ec.tasklist | 1 | ||||
-rw-r--r-- | board/careena/gpio.inc | 1 | ||||
-rw-r--r-- | board/grunt/board.h | 20 | ||||
-rw-r--r-- | board/liara/board.c | 6 | ||||
-rw-r--r-- | board/liara/ec.tasklist | 1 | ||||
-rw-r--r-- | board/liara/gpio.inc | 1 |
10 files changed, 20 insertions, 24 deletions
diff --git a/board/aleena/board.c b/board/aleena/board.c index 85955d7081..c79b1c3b93 100644 --- a/board/aleena/board.c +++ b/board/aleena/board.c @@ -14,9 +14,6 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "driver/accel_kionix.h" -#include "driver/accel_kx022.h" -#include "driver/accelgyro_bmi160.h" #include "driver/led/lm3630a.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx74xx.h" @@ -29,7 +26,6 @@ #include "i2c.h" #include "keyboard_scan.h" #include "lid_switch.h" -#include "motion_sense.h" #include "power.h" #include "power_button.h" #include "pwm.h" @@ -108,8 +104,6 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); static void board_init(void) { - /* Enable Gyro interrupts */ - gpio_enable_interrupt(GPIO_6AXIS_INT_L); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); diff --git a/board/aleena/ec.tasklist b/board/aleena/ec.tasklist index a4253b04c4..d6e0be07b8 100644 --- a/board/aleena/ec.tasklist +++ b/board/aleena/ec.tasklist @@ -25,7 +25,6 @@ TASK_ALWAYS(USB_CHG_P0, usb_charger_task, 0, TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG_P1, usb_charger_task, 1, TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(PDCMD, pd_command_task, NULL, LARGER_TASK_STACK_SIZE) \ diff --git a/board/aleena/gpio.inc b/board/aleena/gpio.inc index 9b2f73fd4a..90e874f69e 100644 --- a/board/aleena/gpio.inc +++ b/board/aleena/gpio.inc @@ -23,7 +23,6 @@ GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) GPIO_INT(VOLUME_DOWN_L, PIN(7, 0), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) GPIO_INT(VOLUME_UP_L, PIN(7, 5), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) GPIO_INT(USB_C0_CABLE_DET, PIN(3, 7), GPIO_INT_RISING, anx74xx_cable_det_interrupt) -GPIO_INT(6AXIS_INT_L, PIN(8, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt) GPIO(EN_PWR_A, PIN(E, 2), GPIO_OUT_LOW) /* Enable Power */ GPIO(EN_PP1800_SENSOR, PIN(6, 7), GPIO_OUT_LOW) /* Enable Power */ diff --git a/board/careena/board.c b/board/careena/board.c index a54acb8a17..fd3f417ae4 100644 --- a/board/careena/board.c +++ b/board/careena/board.c @@ -14,9 +14,6 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "driver/accel_kionix.h" -#include "driver/accel_kx022.h" -#include "driver/accelgyro_bmi160.h" #include "driver/led/lm3630a.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx74xx.h" @@ -29,7 +26,6 @@ #include "i2c.h" #include "keyboard_scan.h" #include "lid_switch.h" -#include "motion_sense.h" #include "power.h" #include "power_button.h" #include "pwm.h" @@ -107,8 +103,6 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); static void board_init(void) { - /* Careena has no motion sensors */ - motion_sensor_count = 0; } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); diff --git a/board/careena/ec.tasklist b/board/careena/ec.tasklist index a4253b04c4..d6e0be07b8 100644 --- a/board/careena/ec.tasklist +++ b/board/careena/ec.tasklist @@ -25,7 +25,6 @@ TASK_ALWAYS(USB_CHG_P0, usb_charger_task, 0, TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG_P1, usb_charger_task, 1, TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(PDCMD, pd_command_task, NULL, LARGER_TASK_STACK_SIZE) \ diff --git a/board/careena/gpio.inc b/board/careena/gpio.inc index 80cad0c453..070720b9f7 100644 --- a/board/careena/gpio.inc +++ b/board/careena/gpio.inc @@ -23,7 +23,6 @@ GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) GPIO_INT(VOLUME_DOWN_L, PIN(7, 0), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) GPIO_INT(VOLUME_UP_L, PIN(7, 5), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) GPIO_INT(USB_C0_CABLE_DET, PIN(3, 7), GPIO_INT_RISING, anx74xx_cable_det_interrupt) -GPIO_INT(6AXIS_INT_L, PIN(8, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt) GPIO(EN_PWR_A, PIN(E, 2), GPIO_OUT_LOW) /* Enable Power */ GPIO(EN_PP1800_SENSOR, PIN(6, 7), GPIO_OUT_LOW) /* Enable Power */ diff --git a/board/grunt/board.h b/board/grunt/board.h index 789781f885..08ce881a12 100644 --- a/board/grunt/board.h +++ b/board/grunt/board.h @@ -43,6 +43,26 @@ /* KB backlight driver */ #define CONFIG_LED_DRIVER_LM3630A +/* Motion sensing drivers */ +#define CONFIG_ACCELGYRO_BMI160 +#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) +#define CONFIG_ACCEL_INTERRUPTS +#define CONFIG_ACCEL_KX022 +#define CONFIG_CMD_ACCELS +#define CONFIG_CMD_ACCEL_INFO +#define CONFIG_TABLET_MODE +#define CONFIG_LID_ANGLE +#define CONFIG_LID_ANGLE_TABLET_MODE +#define CONFIG_LID_ANGLE_INVALID_CHECK +#define CONFIG_LID_ANGLE_UPDATE +#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL +#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL +/* + * Slew rate on the PP1800_SENSOR load switch requires a short delay on startup. + */ +#undef CONFIG_MOTION_SENSE_RESUME_DELAY_US +#define CONFIG_MOTION_SENSE_RESUME_DELAY_US (10 * MSEC) + #ifndef __ASSEMBLER__ enum pwm_channel { diff --git a/board/liara/board.c b/board/liara/board.c index 6450ad034b..2b452ad3f7 100644 --- a/board/liara/board.c +++ b/board/liara/board.c @@ -14,9 +14,6 @@ #include "common.h" #include "compile_time_macros.h" #include "console.h" -#include "driver/accel_kionix.h" -#include "driver/accel_kx022.h" -#include "driver/accelgyro_bmi160.h" #include "driver/led/lm3630a.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx74xx.h" @@ -29,7 +26,6 @@ #include "i2c.h" #include "keyboard_scan.h" #include "lid_switch.h" -#include "motion_sense.h" #include "power.h" #include "power_button.h" #include "pwm.h" @@ -120,8 +116,6 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); static void board_init(void) { - /* Enable Gyro interrupts */ - gpio_enable_interrupt(GPIO_6AXIS_INT_L); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); diff --git a/board/liara/ec.tasklist b/board/liara/ec.tasklist index a4253b04c4..d6e0be07b8 100644 --- a/board/liara/ec.tasklist +++ b/board/liara/ec.tasklist @@ -25,7 +25,6 @@ TASK_ALWAYS(USB_CHG_P0, usb_charger_task, 0, TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG_P1, usb_charger_task, 1, TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(PDCMD, pd_command_task, NULL, LARGER_TASK_STACK_SIZE) \ diff --git a/board/liara/gpio.inc b/board/liara/gpio.inc index ed69de978a..05dc06f15b 100644 --- a/board/liara/gpio.inc +++ b/board/liara/gpio.inc @@ -23,7 +23,6 @@ GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) GPIO_INT(VOLUME_DOWN_L, PIN(7, 0), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) GPIO_INT(VOLUME_UP_L, PIN(7, 5), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) GPIO_INT(USB_C0_CABLE_DET, PIN(3, 7), GPIO_INT_RISING, anx74xx_cable_det_interrupt) -GPIO_INT(6AXIS_INT_L, PIN(8, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt) GPIO(EN_PWR_A, PIN(E, 2), GPIO_OUT_LOW) /* Enable Power */ GPIO(EN_PP1800_SENSOR, PIN(6, 7), GPIO_OUT_LOW) /* Enable Power */ |