From 73a1f95106a91a9c8de6cd7830da22c5cf623133 Mon Sep 17 00:00:00 2001 From: George Lee Date: Mon, 17 Oct 2022 17:08:31 -0700 Subject: [PATCH] Add BrownoutDetected Events - device Brownout Detection is detected during the boot sequence. If the previous shutdown resulted in a reboot reason that has *ocp* or *uvlo* in it, the shutdown was due to brownout. Mitigation Logger should have logged the device state during the brownout. This event metric is to surface the logged data. Bug: 250009365 Test: Confirm triggering of events Signed-off-by: George Lee Change-Id: Ib142a4135d0a9ff617fc8355f0ba978b5c3f8afb --- pixelstats/service.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp index 62f60b1e..bd98ade4 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -43,6 +43,9 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = { .ImpedancePath = "/sys/devices/platform/audiometrics/speaker_impedance", .CodecPath = "/sys/devices/platform/audiometrics/codec_state", .EEPROMPath = "/dev/battery_history", + .MitigationPath = "/sys/devices/virtual/pmic/mitigation", + .BrownoutReasonProp = "vendor.brownout_reason", + .BrownoutLogPath = "/data/vendor/mitigation/lastmeal.txt", .SpeakerTemperaturePath = "/sys/devices/platform/audiometrics/speaker_temp", .SpeakerExcursionPath = "/sys/devices/platform/audiometrics/speaker_excursion", .SpeakerHeartBeatPath = "/sys/devices/platform/audiometrics/speaker_heartbeat",