EmbeddedController
EmbeddedController copied to clipboard
azalea/lotus: CHG_LIMIT_GET_LIMIT disables override
This is a repeat of bug #6 for azalea and lotus
Querying the charge limit with host command
CHARGE_LIMIT_CONTROLmodeCHG_LIMIT_GET_LIMITreloads the charge limit from bbram, which overwrites theCHG_LIMIT_OVERRIDEflag.
The override flag is cleared when we read into charging_maximum_level here:
azalea
https://github.com/FrameworkComputer/EmbeddedController/blob/b4c1fb88ae189ef7efbf8e2a55340723a24e4d11/zephyr/program/lotus/azalea/src/battery.c#L337-L341
lotus
https://github.com/FrameworkComputer/EmbeddedController/blob/b4c1fb88ae189ef7efbf8e2a55340723a24e4d11/zephyr/program/lotus/lotus/src/battery.c#L433-L437