mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
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>