dump_power: add RT9470G dump into bugreport

1. power supply properties
2. registers

Bug: 347914940
Test: adb bugreport
Flag: EXEMPT bugfix
Change-Id: Ie6f2de3acef515665727f3e3bc0e4373778ffe07
Signed-off-by: Jack Wu <wjack@google.com>
This commit is contained in:
Jack Wu 2024-06-18 21:05:52 +08:00
parent 84adc6e0dc
commit 77f2807cf9

View file

@ -235,6 +235,21 @@ void dumpPowerSupplyDock() {
}
}
void dumpSecondCharge() {
const char* powerSupplyPropertySecChgTitle = "Power supply property rt9471";
const char* powerSupplyPropertySecChgFile = "/sys/class/power_supply/rt9471/uevent";
const char *secChgTitle = "RT9470G";
const char *secChgFile = "/sys/devices/platform/10ca0000.hsi2c/i2c-10/10-005b/registers_dump";
if (isValidFile(powerSupplyPropertySecChgFile)) {
dumpFileContent(powerSupplyPropertySecChgTitle, powerSupplyPropertySecChgFile);
}
if (isValidFile(secChgFile)) {
dumpFileContent(secChgTitle, secChgFile);
}
}
void dumpLogBufferTcpm() {
const char* logbufferTcpmTitle = "Logbuffer TCPM";
const char* logbufferTcpmFile = "/dev/logbuffer_tcpm";
@ -1069,6 +1084,7 @@ int main() {
dumpPowerStatsTimes();
dumpAcpmStats();
dumpPowerSupplyStats();
dumpSecondCharge();
dumpMaxFg();
dumpPowerSupplyDock();
dumpLogBufferTcpm();