summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbolan.wang <bolan.wang@bitland.com.cn>2017-03-05 22:47:25 -0500
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2017-03-09 04:31:22 +0000
commite8b9bd21c5d7882a219a2d53f8191a8fbcdc5484 (patch)
tree7ab646a68579ed1e0a48a7518cc0a899569bd87d
parentb72e7183690e6678c7807259841e07f361a63189 (diff)
downloadchrome-ec-e8b9bd21c5d7882a219a2d53f8191a8fbcdc5484.tar.gz
pbody:enable/disable trackpad interrupt
For the hardware changes, modify the gpio TRACKPAD_INT_DISABLE configuration. This change disables the keyboard and the trackpad when the lid goes beyond 180 degree. Keyboard and touchpad are also enabled/disabled by the tablet switch. When the lid reaches 360 position, keyboard and touchpad are disabled. And they stay disabled as long as the lid stays at 360 position. This prevents keyboard and touchpad from turning on by the (faulty) lid angle calculation. And enable/Dislable keyboard and touchpad is required to prevent EC from waking up the system from S3 in tablet mode. BUG=none BRANCH=firmware-glados-7820.B TEST=build and burn on pbody 1.Keyboard and trackpad are disabled when the lid goes beyond 180 and re-enabled when it's smaller than 180. 2. Keyboard and trackpad are disabled in tablet mode and the system doesn't wake up by a keypress. Change-Id: Id8c2026eba182fa87fbd417b204a1658117b43cc Reviewed-on: https://chromium-review.googlesource.com/449596 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Vanillan Wang <bolan.wang@bitland.corp-partner.google.com> Tested-by: Vanillan Wang <bolan.wang@bitland.corp-partner.google.com>
-rw-r--r--board/pbody/board.c5
-rw-r--r--board/pbody/gpio.inc3
2 files changed, 6 insertions, 2 deletions
diff --git a/board/pbody/board.c b/board/pbody/board.c
index ef3339ba6f..4face0bc5b 100644
--- a/board/pbody/board.c
+++ b/board/pbody/board.c
@@ -625,9 +625,12 @@ void lid_angle_peripheral_enable(int enable)
if (enable) {
keyboard_scan_enable(1, KB_SCAN_DISABLE_LID_ANGLE);
+ gpio_set_level(GPIO_TRACKPAD_INT_ENABLE, 1);
} else {
- if (!chipset_in_s0)
+ if (!chipset_in_s0) {
keyboard_scan_enable(0, KB_SCAN_DISABLE_LID_ANGLE);
+ gpio_set_level(GPIO_TRACKPAD_INT_ENABLE, 0);
+ }
}
}
diff --git a/board/pbody/gpio.inc b/board/pbody/gpio.inc
index eac8af9816..fcf097843a 100644
--- a/board/pbody/gpio.inc
+++ b/board/pbody/gpio.inc
@@ -73,7 +73,8 @@ GPIO(USB_C0_DISCHARGE, PIN(136), GPIO_OUT_LOW)
GPIO(PCH_ACOK, PIN(110), GPIO_OUT_LOW)
/* Interrupts from accelerometer / gyro -- not yet implemented */
GPIO(ACCEL1_INT, PIN(161), GPIO_INPUT)
-GPIO(NC_GPIO127, PIN(127), GPIO_INPUT | GPIO_PULL_UP)
+/* Enable/disable trackpad interrupts pin */
+GPIO(TRACKPAD_INT_ENABLE, PIN(127), GPIO_OUT_HIGH)
GPIO(ACCEL4_INT, PIN(157), GPIO_INPUT)
GPIO(WLAN_OFF_L, PIN(132), GPIO_OUT_LOW)
/* RCIN# line to PCH for 8042 emulation */