summaryrefslogtreecommitdiff
path: root/board/bobba
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-11-14 11:19:21 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-11-16 05:01:37 -0800
commitb2b656ab9773d93eab24cef58a32469c0fe2e589 (patch)
tree5ca64026ef25686fa96e655c0a7f376bf0b608a3 /board/bobba
parent618ab07b7078075ed94f5488bd984065fc5831f4 (diff)
downloadchrome-ec-b2b656ab9773d93eab24cef58a32469c0fe2e589.tar.gz
bobba: add PD to unused lines to prevent float
Depending on the model, we do not stuff the base accel or the camera. When we detect those SKU, do not enable the interrupt and add a pull down resistor to prevent the line from floating since there isn't an external pull BRANCH=none BUG=none TEST=Verified that sensors/board still work on Bobba360 and Bobba, also verified that power stayed the same or slightly lower (11.32mW on PP3300_ec_mw to 11.29mW over 10 sec average on bobba. 13.62mW->13.56mW for bobba360). Change-Id: I36b01dd79a0f493a2bf9d3cbae54e9863773a056 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1335686 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Diffstat (limited to 'board/bobba')
-rw-r--r--board/bobba/board.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/board/bobba/board.c b/board/bobba/board.c
index 5bb71f806f..4026a8507b 100644
--- a/board/bobba/board.c
+++ b/board/bobba/board.c
@@ -263,15 +263,26 @@ static void board_update_sensor_config_from_sku(void)
{
if (board_is_convertible()) {
motion_sensor_count = ARRAY_SIZE(motion_sensors);
+ /* Enable Base Accel interrupt */
+ gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L);
} else {
motion_sensor_count = 0;
tablet_disable_switch();
+ /* Base accel is not stuffed, don't allow line to float */
+ gpio_set_flags(GPIO_BASE_SIXAXIS_INT_L,
+ GPIO_INPUT | GPIO_PULL_DOWN);
}
/* Sparky360 with AR Cam: base accel/gyro sensor is on AR Cam board. */
if (board_with_ar_cam()) {
+ /* Enable interrupt from camera */
+ gpio_enable_interrupt(GPIO_WFCAM_VSYNC);
+
motion_sensors[BASE_ACCEL].rot_standard_ref = &base_ar_cam_ref;
motion_sensors[BASE_GYRO].rot_standard_ref = &base_ar_cam_ref;
+ } else {
+ /* Camera isn't stuffed, don't allow line to float */
+ gpio_set_flags(GPIO_WFCAM_VSYNC, GPIO_INPUT | GPIO_PULL_DOWN);
}
}
@@ -289,17 +300,6 @@ static void cbi_init(void)
}
DECLARE_HOOK(HOOK_INIT, cbi_init, HOOK_PRIO_INIT_I2C + 1);
-/* Initialize board. */
-static void board_init(void)
-{
- /* Enable Base Accel interrupt */
- gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L);
-
- /* Enable interrupt for the camera vsync. */
- gpio_enable_interrupt(GPIO_WFCAM_VSYNC);
-}
-DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
-
void board_hibernate_late(void) {
int i;