EmbeddedController icon indicating copy to clipboard operation
EmbeddedController copied to clipboard

azalea/lotus: CHG_LIMIT_GET_LIMIT disables override

Open DHowett opened this issue 1 year ago • 0 comments

This is a repeat of bug #6 for azalea and lotus

Querying the charge limit with host command CHARGE_LIMIT_CONTROL mode CHG_LIMIT_GET_LIMIT reloads the charge limit from bbram, which overwrites the CHG_LIMIT_OVERRIDE flag.

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

DHowett avatar Jun 02 '24 23:06 DHowett