summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdumpstate/DumpstateDevice.cpp38
-rw-r--r--init.hardware.rc2
2 files changed, 25 insertions, 15 deletions
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index daebebb6..9913c7d8 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -238,24 +238,32 @@ static void DumpTouch(int fd) {
touch_sysfs_path + "buildid");
DumpFileToFd(fd, "Synaptics touch config version",
touch_sysfs_path + "config");
+ RunCommandToFd(fd, "keep touch stay awake",
+ {"/vendor/bin/sh", "-c",
+ "echo 02 >" + touch_sysfs_path + "suspend"});
DumpFileToFd(fd, "Synaptics touch noise information",
touch_sysfs_path + "noise_state");
- RunCommandToFd(fd, "Touch Cm Raw data",
- {"/vendor/bin/sh", "-c",
- "echo 20 >" + touch_sysfs_path + "read_report"
- " && cat " + touch_sysfs_path + "read_report"});
- RunCommandToFd(fd, "Touch Cm Jitter",
- {"/vendor/bin/sh", "-c",
- "echo 02 >" + touch_sysfs_path + "read_report"
- " && cat " + touch_sysfs_path + "read_report"});
- RunCommandToFd(fd, "Touch Cs Raw data",
- {"/vendor/bin/sh", "-c",
- "echo 63 >" + touch_sysfs_path + "read_report"
- " && cat " + touch_sysfs_path + "read_report"});
- RunCommandToFd(fd, "Touch Cs Jitter",
+ for (int i = 0; i < 5; i++) {
+ RunCommandToFd(fd, "Touch Cm Raw data",
+ {"/vendor/bin/sh", "-c",
+ "echo 20 >" + touch_sysfs_path + "read_report"
+ " && cat " + touch_sysfs_path + "read_report"});
+ RunCommandToFd(fd, "Touch Cm Jitter",
+ {"/vendor/bin/sh", "-c",
+ "echo 02 >" + touch_sysfs_path + "read_report"
+ " && cat " + touch_sysfs_path + "read_report"});
+ RunCommandToFd(fd, "Touch Cs Raw data",
+ {"/vendor/bin/sh", "-c",
+ "echo 63 >" + touch_sysfs_path + "read_report"
+ " && cat " + touch_sysfs_path + "read_report"});
+ RunCommandToFd(fd, "Touch Cs Jitter",
+ {"/vendor/bin/sh", "-c",
+ "echo 59 >" + touch_sysfs_path + "read_report"
+ " && cat " + touch_sysfs_path + "read_report"});
+ }
+ RunCommandToFd(fd, "keep touch stay awake disable",
{"/vendor/bin/sh", "-c",
- "echo 59 >" + touch_sysfs_path + "read_report"
- " && cat " + touch_sysfs_path + "read_report"});
+ "echo 00 >" + touch_sysfs_path + "suspend"});
}
}
diff --git a/init.hardware.rc b/init.hardware.rc
index 1e82a672..e4644993 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -880,6 +880,8 @@ on property:persist.vendor.charge.start.level=*
on property:ro.boot.hardware.radio.subtype=0
setprop audio.camerasound.force true
+# Touch
on property:vendor.all.modules.ready=1
wait /sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input2/read_report
chown system system /sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input2/read_report
+ chown system system /sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input2/suspend