dumpstate: modify the method for dump touch information

Use bugreport flag to keep waking up the touch driver instead of
force active flag to prevent the kernel driver from blocking CPU
enter the suspend mode.

Bug: 183466375
Test: touch driver won't block system suspend.

Signed-off-by: davidycchen <davidycchen@google.com>
Change-Id: I586173485bd41deac891b7edb366b51a99977434
This commit is contained in:
davidycchen 2021-05-13 10:16:56 +08:00 committed by TreeHugger Robot
parent 777a57c92a
commit 2b65d2e31c

View file

@ -428,8 +428,8 @@ void DumpstateDevice::dumpTouchSection(int fd) {
for (int i = 0; i < 4; i+=2) {
snprintf(cmd, sizeof(cmd), "%s", stm_cmd_path[i + 1]);
if (!access(cmd, R_OK)) {
snprintf(cmd, sizeof(cmd), "echo A0 01 > %s", stm_cmd_path[i + 1]);
RunCommandToFd(fd, "Force Set AP as Bus Owner",
snprintf(cmd, sizeof(cmd), "echo A0 01 01 > %s", stm_cmd_path[i + 1]);
RunCommandToFd(fd, "Force Set AP as Bus Owner with Bugreport Flag",
{"/vendor/bin/sh", "-c", cmd});
}
@ -539,7 +539,7 @@ void DumpstateDevice::dumpTouchSection(int fd) {
snprintf(cmd, sizeof(cmd), "%s", stm_cmd_path[i + 1]);
if (!access(cmd, R_OK)) {
snprintf(cmd, sizeof(cmd), "echo A0 00 > %s", stm_cmd_path[i + 1]);
snprintf(cmd, sizeof(cmd), "echo A0 00 01 > %s", stm_cmd_path[i + 1]);
RunCommandToFd(fd, "Restore Bus Owner",
{"/vendor/bin/sh", "-c", cmd});
}