dumpstate: Dump GTI touch information.
Dump the touch information and rawdata when bugreport is triggered. Bug: 214118904 Test: adb bugreport Change-Id: I08834cf0176be69359264189b703486e33925f2b Signed-off-by: Wendly Li <wendlyli@google.com>
This commit is contained in:
parent
0f2d1bd801
commit
08c526a578
1 changed files with 43 additions and 0 deletions
|
@ -528,6 +528,7 @@ void Dumpstate::dumpTouchSection(int fd) {
|
|||
const char lsi_spi_path[] = "/sys/devices/virtual/sec/tsp";
|
||||
const char syna_cmd_path[] = "/sys/class/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs";
|
||||
const char focaltech_cmd_path[] = "/proc/focaltech_touch";
|
||||
const char gti0_cmd_path[] = "/sys/devices/virtual/goog_touch_interface/gti.0";
|
||||
char cmd[256];
|
||||
|
||||
if (!access(focaltech_cmd_path, R_OK)) {
|
||||
|
@ -819,6 +820,48 @@ void Dumpstate::dumpTouchSection(int fd) {
|
|||
lsi_spi_path, lsi_spi_path);
|
||||
RunCommandToFd(fd, "Force Touch Active", {"/vendor/bin/sh", "-c", cmd});
|
||||
}
|
||||
|
||||
if (!access(gti0_cmd_path, R_OK)) {
|
||||
// Enable: force touch active
|
||||
snprintf(cmd, sizeof(cmd), "echo 1 > %s/force_active", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Force Touch Active", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Touch Firmware Version
|
||||
snprintf(cmd, sizeof(cmd), "%s/fw_ver", gti0_cmd_path);
|
||||
DumpFileToFd(fd, "Touch Firmware Version", cmd);
|
||||
|
||||
// Get Mutual Sensing Data - Baseline
|
||||
snprintf(cmd, sizeof(cmd), "cat %s/ms_base", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Get Mutual Sensing Data - Baseline", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Get Mutual Sensing Data - Delta
|
||||
snprintf(cmd, sizeof(cmd), "cat %s/ms_diff", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Get Mutual Sensing Data - Delta", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Get Mutual Sensing Data - Raw
|
||||
snprintf(cmd, sizeof(cmd), "cat %s/ms_raw", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Get Mutual Sensing Data - Raw", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Get Self Sensing Data - Baseline
|
||||
snprintf(cmd, sizeof(cmd), "cat %s/ss_base", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Get Self Sensing Data - Baseline", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Get Self Sensing Data - Delta
|
||||
snprintf(cmd, sizeof(cmd), "cat %s/ss_diff", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Get Self Sensing Data - Delta", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Get Self Sensing Data - Raw
|
||||
snprintf(cmd, sizeof(cmd), "cat %s/ss_raw", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Get Self Sensing Data - Raw", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Self Test
|
||||
snprintf(cmd, sizeof(cmd), "cat %s/self_test", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Self Test", {"/vendor/bin/sh", "-c", cmd});
|
||||
|
||||
// Disable: force touch active
|
||||
snprintf(cmd, sizeof(cmd), "echo 0 > %s/force_active", gti0_cmd_path);
|
||||
RunCommandToFd(fd, "Disable Force Touch Active", {"/vendor/bin/sh", "-c", cmd});
|
||||
}
|
||||
}
|
||||
|
||||
// Dump items related to SoC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue