Snap for 7921921 from 41c75ffb57 to tm-release

Change-Id: I7e1aa918c8ec6a838d70c9e143b7f4ed02bde056
This commit is contained in:
Android Build Coastguard Worker 2021-11-17 02:01:16 +00:00
commit 47f87ece8c
3 changed files with 37 additions and 0 deletions

View file

@ -646,6 +646,7 @@ on property:vendor.device.modules.ready=1
chown system system /sys/devices/virtual/sec/tsp/cmd chown system system /sys/devices/virtual/sec/tsp/cmd
chown system system /sys/devices/virtual/sec/tsp/cmd_result chown system system /sys/devices/virtual/sec/tsp/cmd_result
chown system system /sys/devices/virtual/sec/tsp/status chown system system /sys/devices/virtual/sec/tsp/status
chown system system /sys/devices/virtual/input/nvt_touch/force_touch_active
# Allow access to touch # Allow access to touch
chown system input /dev/touch_offload chown system input /dev/touch_offload
chmod 660 /dev/touch_offload chmod 660 /dev/touch_offload

View file

@ -250,6 +250,7 @@ void endSection(int fd, const std::string &sectionName, timepoint_t startTime) {
DumpstateDevice::DumpstateDevice() DumpstateDevice::DumpstateDevice()
: mTextSections{ : mTextSections{
{ "pre-touch", [this](int fd) { dumpPreTouchSection(fd); } },
{ "wlan", [this](int fd) { dumpWlanSection(fd); } }, { "wlan", [this](int fd) { dumpWlanSection(fd); } },
{ "soc", [this](int fd) { dumpSocSection(fd); } }, { "soc", [this](int fd) { dumpSocSection(fd); } },
{ "storage", [this](int fd) { dumpStorageSection(fd); } }, { "storage", [this](int fd) { dumpStorageSection(fd); } },
@ -498,6 +499,40 @@ void DumpstateDevice::dumpThermalSection(int fd) {
} }
// Dump items related to touch // Dump items related to touch
void DumpstateDevice::dumpPreTouchSection(int fd) {
const char nvt_spi_path[] = "/sys/devices/virtual/input/nvt_touch";
char cmd[256];
/* NVT touch */
if (!access(nvt_spi_path, R_OK)) {
snprintf(cmd, sizeof(cmd),
"echo %s > %s/%s",
"0x21",
nvt_spi_path,
"force_touch_active");
RunCommandToFd(fd, "Force Touch Active(Enable)", {"/vendor/bin/sh", "-c", cmd});
snprintf(cmd, sizeof(cmd), "/proc/nvt_fw_version");
if (!access(cmd, R_OK))
DumpFileToFd(fd, "FW version", cmd);
snprintf(cmd, sizeof(cmd), "/proc/nvt_diff");
if (!access(cmd, R_OK))
DumpFileToFd(fd, "Diff", cmd);
snprintf(cmd, sizeof(cmd), "%s/nvt_fw_history", nvt_spi_path);
if (!access(nvt_spi_path, R_OK))
DumpFileToFd(fd, "FW History", cmd);
snprintf(cmd, sizeof(cmd),
"echo %s > %s/%s",
"0x20",
nvt_spi_path,
"force_touch_active");
RunCommandToFd(fd, "Force Touch Active(Disable)", {"/vendor/bin/sh", "-c", cmd});
}
}
void DumpstateDevice::dumpTouchSection(int fd) { void DumpstateDevice::dumpTouchSection(int fd) {
const char stm_cmd_path[4][50] = {"/sys/class/spi_master/spi11/spi11.0", const char stm_cmd_path[4][50] = {"/sys/class/spi_master/spi11/spi11.0",
"/proc/fts/driver_test", "/proc/fts/driver_test",

View file

@ -64,6 +64,7 @@ struct DumpstateDevice : public IDumpstateDevice {
void dumpWlanSection(int fd); void dumpWlanSection(int fd);
void dumpPowerSection(int fd); void dumpPowerSection(int fd);
void dumpThermalSection(int fd); void dumpThermalSection(int fd);
void dumpPreTouchSection(int fd);
void dumpTouchSection(int fd); void dumpTouchSection(int fd);
void dumpSocSection(int fd); void dumpSocSection(int fd);
void dumpCpuSection(int fd); void dumpCpuSection(int fd);