10 Commits

Author SHA1 Message Date
samou
0a00bc714a bm: Add Battery SOC for each platforms
Bug: 299700579
Change-Id: Id2f9b86ded4d9f31fd5faf2d761b5ded7bab5aff
Signed-off-by: samou <samou@google.com>
2023-11-22 06:42:35 +00:00
George Lee
1201db75a1 bm: Add triggered event thread
Add thread to handle triggered event.
Remove pcieModem, Wifi and last_triggered_mode stats.

Bug: 299700579
Test: Flash and boot
Change-Id: I9d4877be71e64ad0ee53bccb705fca8bbc4d5ad8
Signed-off-by: George Lee <geolee@google.com>
2023-11-14 22:00:33 +00:00
samou
fface22c8a bcl: Create lastmeal.csv
Bug: 293899466
Change-Id: I0b7160177da66a598288d2e1782e6c244b02636e
Signed-off-by: samou <samou@google.com>
2023-11-08 02:00:15 +00:00
samou
e153fc34ad bcl: Support thismeal binary
Add command for dump_power to create thismeal.txt
from thismeal.bin.

Support BatteryMitigationService to monitor
brownout event and generate thismeal.bin.

Test: /vendor/bin/hw/battery_mitigation -d
Bug: 293899466
Change-Id: I3fcbd62af25204a7469dd3952a91cd6d281bccd7
Signed-off-by: samou <samou@google.com>
2023-11-02 05:45:22 +00:00
samou
440a92fd67 bcl: start brownout event thread
Allow multiple sepolicy and start thread to monitor
brownout event

Bug: 290149543
Change-Id: I2e9f3dc180a37b60e5e51ac5c4c1b0aa79073328
Signed-off-by: samou <samou@google.com>
2023-10-26 03:24:45 +00:00
George Lee
6c25d5a7fd bm: Exit loop to check for BCL after 10 tries
battery_mitigation may be kept in forever loop to read sysfs node.  This
makes sure that the loop is exited after 10 tries.

Bug: 275028861
Test: Local boot up and ensure battery_mitigation comes up
Change-Id: I02936f4426519b2c9fbc776cdb2614fdeba872c0
Signed-off-by: George Lee <geolee@google.com>
2023-03-27 19:55:53 -07:00
Xiang Wang
f060fe353c Migrate battery mitigation to Thermal AIDL
Bug: b/269163592
Test: Thermal AIDL service restart test + pmic file test
Change-Id: I4922b0f7c6c2583143fcdd24e3039e17ced4a68b
2023-03-13 23:54:34 +00:00
George Lee
930ea07e39 logger: Change access right to lastmeal.txt
Bugreport cannot access lastmeal.txt due to access right.

Bug: 239709385
Test: confirm lastmeal.txt has system:system
Change-Id: Id207bf86096333710f8e55533fb806ae9f3a66c5
Signed-off-by: George Lee <geolee@google.com>
2023-02-01 17:44:01 +00:00
George Lee
fd2395f40f Battery Mitigation: Use Brownout Reason
Brownout Reason replaces startup_bugreport_requested.  Battery
Mitigation needs to be updated.

Bug: 237287659
Test: Ensure lastmeal.txt is properly generated.
Change-Id: I33791886e0ea8fcfb3324c0f64384ffe245808d3
Signed-off-by: George Lee <geolee@google.com>
2022-12-02 01:34:08 +00:00
George Lee
a1bea3e3e3 bcl: Add Mitigation Logger
Mitigation Logger logs battery related information for 1 second when it
is triggered by under voltage or over current interrupts.  Information
collected is to help debug system brownout.

Bug: 228383769
Test: Boot and Test
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I24e5075b12a9bb3f16241de268254bde38c133d0
2022-10-28 05:25:08 +00:00