summaryrefslogtreecommitdiff
path: root/dumpstate
diff options
context:
space:
mode:
authorAdam Shih <adamshih@google.com>2022-11-28 14:13:43 +0800
committerAdam Shih <adamshih@google.com>2022-11-29 04:47:15 +0000
commit5382b6adb3371de144214a1f900e75413cc86307 (patch)
tree4d6aaadb0bb7b376194e4f2776b5c7768bc5e263 /dumpstate
parentf96a1b8ad0e257e2e054cdae61c523557c4c3592 (diff)
downloadgs201-5382b6adb3371de144214a1f900e75413cc86307.tar.gz
move touch dump to gs-common
Bug: 256521567 Test: adb bugreport Change-Id: Ic13dc189eccd1a5f4f204326b1e93303b9492f69
Diffstat (limited to 'dumpstate')
-rw-r--r--dumpstate/Dumpstate.cpp130
-rw-r--r--dumpstate/Dumpstate.h1
2 files changed, 0 insertions, 131 deletions
diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp
index 031e6b8..4fdcc10 100644
--- a/dumpstate/Dumpstate.cpp
+++ b/dumpstate/Dumpstate.cpp
@@ -229,7 +229,6 @@ Dumpstate::Dumpstate()
{ "Devfreq", [this](int fd) { dumpDevfreqSection(fd); } },
{ "cpu", [this](int fd) { dumpCpuSection(fd); } },
{ "power", [this](int fd) { dumpPowerSection(fd); } },
- { "touch", [this](int fd) { dumpTouchSection(fd); } },
{ "display", [this](int fd) { dumpDisplaySection(fd); } },
{ "misc", [this](int fd) { dumpMiscSection(fd); } },
{ "led", [this](int fd) { dumpLEDSection(fd); } },
@@ -508,135 +507,6 @@ void Dumpstate::dumpPowerSection(int fd) {
}
-// Dump items related to touch
-void Dumpstate::dumpTouchSection(int fd) {
- const char stm_cmd_path[4][50] = {"/sys/class/spi_master/spi11/spi11.0",
- "/proc/fts/driver_test",
- "/sys/class/spi_master/spi6/spi6.0",
- "/proc/fts_ext/driver_test"};
- char cmd[256];
-
- 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 01 > %s", stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Force Set AP as Bus Owner with Bugreport Flag",
- {"/vendor/bin/sh", "-c", cmd});
- }
-
- snprintf(cmd, sizeof(cmd), "%s/appid", stm_cmd_path[i]);
- if (!access(cmd, R_OK)) {
- // Touch firmware version
- DumpFileToFd(fd, "STM touch firmware version", cmd);
-
- // Touch controller status
- snprintf(cmd, sizeof(cmd), "%s/status", stm_cmd_path[i]);
- DumpFileToFd(fd, "STM touch status", cmd);
-
- // Mutual raw data
- snprintf(cmd, sizeof(cmd),
- "echo 13 00 01 > %s/stm_fts_cmd && cat %s/stm_fts_cmd",
- stm_cmd_path[i], stm_cmd_path[i]);
- RunCommandToFd(fd, "Mutual Raw", {"/vendor/bin/sh", "-c", cmd});
-
- // Mutual strength data
- snprintf(cmd, sizeof(cmd),
- "echo 17 01 > %s/stm_fts_cmd && cat %s/stm_fts_cmd",
- stm_cmd_path[i], stm_cmd_path[i]);
- RunCommandToFd(fd, "Mutual Strength", {"/vendor/bin/sh", "-c", cmd});
-
- // Self raw data
- snprintf(cmd, sizeof(cmd),
- "echo 15 00 01 > %s/stm_fts_cmd && cat %s/stm_fts_cmd",
- stm_cmd_path[i], stm_cmd_path[i]);
- RunCommandToFd(fd, "Self Raw", {"/vendor/bin/sh", "-c", cmd});
- }
-
- snprintf(cmd, sizeof(cmd), "%s", stm_cmd_path[i + 1]);
- if (!access(cmd, R_OK)) {
- snprintf(cmd, sizeof(cmd), "echo 23 00 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Mutual Raw Data",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 23 03 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Mutual Baseline Data",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 23 02 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Mutual Strength Data",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 24 00 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Self Raw Data",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 24 03 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Self Baseline Data",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 24 02 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Self Strength Data",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 32 10 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Mutual Compensation",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 32 11 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Mutual Low Power Compensation",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 33 12 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Self Compensation",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 34 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Golden Mutual Raw Data",
- {"/vendor/bin/sh", "-c", cmd});
-
- snprintf(cmd, sizeof(cmd), "echo 01 FA 20 00 00 24 80 > %s",
- stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Packaging Plant - HW reset",
- {"/vendor/bin/sh", "-c", cmd});
- snprintf(cmd, sizeof(cmd), "echo 01 FA 20 00 00 68 08 > %s",
- stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Packaging Plant - Hibernate Memory",
- {"/vendor/bin/sh", "-c", cmd});
- snprintf(cmd, sizeof(cmd),
- "echo 02 FB 00 04 3F D8 00 10 01 > %s && cat %s",
- stm_cmd_path[i + 1], stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Packaging Plant - Read 16 bytes from Address 0x00041FD8",
- {"/vendor/bin/sh", "-c", cmd});
- }
-
- snprintf(cmd, sizeof(cmd), "%s/stm_fts_cmd", stm_cmd_path[i]);
- if (!access(cmd, R_OK)) {
- // ITO raw data
- snprintf(cmd, sizeof(cmd),
- "echo 01 > %s/stm_fts_cmd && cat %s/stm_fts_cmd",
- stm_cmd_path[i], stm_cmd_path[i]);
- RunCommandToFd(fd, "ITO Raw", {"/vendor/bin/sh", "-c", cmd});
- }
-
- snprintf(cmd, sizeof(cmd), "%s", stm_cmd_path[i + 1]);
- if (!access(cmd, R_OK)) {
- snprintf(cmd, sizeof(cmd), "echo A0 00 01 > %s", stm_cmd_path[i + 1]);
- RunCommandToFd(fd, "Restore Bus Owner",
- {"/vendor/bin/sh", "-c", cmd});
- }
- }
-}
-
// Dump items related to CPUs
void Dumpstate::dumpCpuSection(int fd) {
DumpFileToFd(fd, "CPU present", "/sys/devices/system/cpu/present");
diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h
index 55dafda..c624df9 100644
--- a/dumpstate/Dumpstate.h
+++ b/dumpstate/Dumpstate.h
@@ -54,7 +54,6 @@ class Dumpstate : public BnDumpstateDevice {
// addition to being included in full dumps
void dumpWlanSection(int fd);
void dumpPowerSection(int fd);
- void dumpTouchSection(int fd);
void dumpCpuSection(int fd);
void dumpDevfreqSection(int fd);
void dumpMemorySection(int fd);