dumpstate: Dump TCPC registers and attributes
debugfs not accessible in user builds. Hence dumping through sysfs. Bug: 200313640 Signed-off-by: Badhri Jagan Sridharan <badhri@google.com> Change-Id: I5e42d1cd9b53c0989dbbb35bf580271d15cd8db3
This commit is contained in:
parent
8108f9d080
commit
aa0a8e1b7d
1 changed files with 10 additions and 0 deletions
|
@ -355,6 +355,16 @@ void DumpstateDevice::dumpPowerSection(int fd) {
|
|||
}
|
||||
}
|
||||
|
||||
RunCommandToFd(fd, "TCPC", {"/vendor/bin/sh", "-c",
|
||||
"for f in /sys/devices/platform/10d50000.hsi2c/i2c-*/i2c-max77759tcpc;"
|
||||
"do echo \"registers:\"; cat $f/registers;"
|
||||
"echo \"frs:\"; cat $f/frs;"
|
||||
"echo \"auto_discharge:\"; cat $f/auto_discharge;"
|
||||
"echo \"bc12_enabled:\"; cat $f/bc12_enabled;"
|
||||
"echo \"cc_toggle_enable:\"; cat $f/cc_toggle_enable;"
|
||||
"echo \"contaminant_detection:\"; cat $f/contaminant_detection;"
|
||||
"echo \"contaminant_detection_status:\"; cat $f/contaminant_detection_status; done"});
|
||||
|
||||
DumpFileToFd(fd, "PD Engine", "/dev/logbuffer_usbpd");
|
||||
DumpFileToFd(fd, "PPS-google_cpm", "/dev/logbuffer_cpm");
|
||||
DumpFileToFd(fd, "PPS-dc", "/dev/logbuffer_pca9468");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue