From 2b65d2e31cacb4085f60b8f9c8f577a618d7742c Mon Sep 17 00:00:00 2001 From: davidycchen Date: Thu, 13 May 2021 10:16:56 +0800 Subject: [PATCH] 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 Change-Id: I586173485bd41deac891b7edb366b51a99977434 --- dumpstate/DumpstateDevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 1f7e0086..a14b7891 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -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}); }