diff options
author | Harry Pan <harry.pan@intel.com> | 2017-01-18 01:26:09 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-18 16:06:54 -0800 |
commit | daf90eab80c1781c3684b5de18807ccd7e62510a (patch) | |
tree | a48bf67930946504ec55ebcf8464ecd4171ccb48 /board | |
parent | 5470e3b80e36e1c06015bca3aa4641d7268cf1e6 (diff) | |
download | chrome-ec-daf90eab80c1781c3684b5de18807ccd7e62510a.tar.gz |
snappy: 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:61058, chrome-os-partner:61618,
chrome-os-partner:61636, chrome-os-partner:61506
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: I0c0b9deffe83aef012f685618b3cbc5dd5303c3a
Signed-off-by: Harry Pan <harry.pan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/428791
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/snappy/board.c | 1 | ||||
-rw-r--r-- | board/snappy/gpio.inc | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/board/snappy/board.c b/board/snappy/board.c index d27a03da9c..18324b294f 100644 --- a/board/snappy/board.c +++ b/board/snappy/board.c @@ -679,7 +679,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/snappy/gpio.inc b/board/snappy/gpio.inc index ba2f1c4a31..bbc9a1d786 100644 --- a/board/snappy/gpio.inc +++ b/board/snappy/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 */ |