dumpstate: Dump GTI touch information. am: 08c526a578
am: 2f4f8d3af5
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs201/+/19475297 Change-Id: Id085e5965cba2683a06f58dc44f6b696d2527e39 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
7f1ea0c30c
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 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 syna_cmd_path[] = "/sys/class/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs";
|
||||||
const char focaltech_cmd_path[] = "/proc/focaltech_touch";
|
const char focaltech_cmd_path[] = "/proc/focaltech_touch";
|
||||||
|
const char gti0_cmd_path[] = "/sys/devices/virtual/goog_touch_interface/gti.0";
|
||||||
char cmd[256];
|
char cmd[256];
|
||||||
|
|
||||||
if (!access(focaltech_cmd_path, R_OK)) {
|
if (!access(focaltech_cmd_path, R_OK)) {
|
||||||
|
@ -819,6 +820,48 @@ void Dumpstate::dumpTouchSection(int fd) {
|
||||||
lsi_spi_path, lsi_spi_path);
|
lsi_spi_path, lsi_spi_path);
|
||||||
RunCommandToFd(fd, "Force Touch Active", {"/vendor/bin/sh", "-c", cmd});
|
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
|
// Dump items related to SoC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue