summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnson Tseng <anson.tseng@intel.com>2017-01-18 17:51:14 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-19 21:27:54 -0800
commita1064d997902b567303e1eb6be5780baa4c0d4ae (patch)
tree97c0a48ca7c475416979040f0d87c1809a5db216
parent875c4ab3db61edbeae4cbab278516c5158273d76 (diff)
downloadchrome-ec-a1064d997902b567303e1eb6be5780baa4c0d4ae.tar.gz
Pyro: Release control of trackpad entirely
Backdrop: Touchpad power source disabling should be constrained in tablet mode and S0->S3 transition only, in case that disable it in the S0 state of tablet mode, it would cause disaster while touchpad driver of AP tries to perform suspend procedure. Solution: follow CL:421275 This change takes away control of trackpad from EC entirely. This will prevent EC from interfering with the OS's interaction with the trackpad for firmware update, device detection at boot, or entering S3. Disadvantages are the trackpad will stay on (thus can wake up the system unintentionally) when the system enters S3 in laptop mode then transitions to tablet mode, or vice versa: the trackpad will stay off (thus cannot wake up the system) when the system enters S3 in tablet mode then transitions to laptop mode. However, these corner cases can be handled by waking up the system upon mode transition. The OS can then disable or enable the trackpad depending on the transition direction (laptop <-> tablet) and re-enters S3. Or the OS can leave the system running because mode transition implies a user's intention to start interacting with the device. The keyboard will continue to be managed by EC and disabled or enabled upon mode transition. BUG=chrome-os-partner:62138 BRANCH=reef TEST=suspend device in tablet mode then wake it up, examine touchpad function; hint: root shell to execute command 'ectool gpioget EN_P3300_TRACKPAD_ODL' to examine trackpad power integrity. Change-Id: I533cdc4a182ab878917495a7b9391f68e7e92e3e Signed-off-by: Anson Tseng <anson.tseng@intel.com> Reviewed-on: https://chromium-review.googlesource.com/430392 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--board/pyro/board.c1
-rw-r--r--board/pyro/gpio.inc2
2 files changed, 1 insertions, 2 deletions
diff --git a/board/pyro/board.c b/board/pyro/board.c
index 3df13841e0..d12b787a6a 100644
--- a/board/pyro/board.c
+++ b/board/pyro/board.c
@@ -680,7 +680,6 @@ void lid_angle_peripheral_enable(int enable)
if (tablet_get_mode() || chipset_in_state(CHIPSET_STATE_ANY_OFF))
enable = 0;
keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE);
- gpio_set_level(GPIO_EN_P3300_TRACKPAD_ODL, !enable);
/*
* In S3 state, then disable KB/TP function
diff --git a/board/pyro/gpio.inc b/board/pyro/gpio.inc
index 8ea100042b..eb83c38fd5 100644
--- a/board/pyro/gpio.inc
+++ b/board/pyro/gpio.inc
@@ -84,7 +84,7 @@ GPIO(EN_PP3300, PIN(C, 2), GPIO_OUT_LOW)
GPIO(PP3300_PG, PIN(6, 2), GPIO_INPUT)
GPIO(EN_PP5000, PIN(C, 6), GPIO_OUT_LOW)
GPIO(PP5000_PG, PIN(7, 1), GPIO_INPUT)
-GPIO(EN_P3300_TRACKPAD_ODL, PIN(3, 2), GPIO_ODR_HIGH)
+GPIO(EN_P3300_TRACKPAD_ODL, PIN(3, 2), GPIO_ODR_LOW)
GPIO(PCH_SYS_PWROK, PIN(E, 7), GPIO_OUT_LOW) /* EC_PCH_PWROK */
GPIO(ENABLE_BACKLIGHT, PIN(9, 7), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* EC_BL_EN_OD */