Expand description
Reusable charge governor runtime framework for Fuchsia.
Provides the Governor trait and run_governor, which bridges the battery and
charger telemetry served by battery-manager to voted fcharger::ControllerMarker settings.
Structs§
- Evaluation
- Desired vote and optional periodic sampling, returned by
Governor::evaluate. - Telemetry
- Combined hardware telemetry snapshot passed to
Governor::evaluate. - Watch
Interest - Battery and charger fields whose changes trigger an evaluation, and those whose changes also
wake the system from suspend to do so. Each is a
Statusmask: only field presence matters.
Traits§
- Governor
- Trait implemented by specific charging algorithms (e.g. MSC, thermal, battery defender).
Functions§
- clear_
vote_ fields - Clears the fields selected by
maskfromvote. - diff_
controls - Computes
(to_set, to_clear)delta masks betweenappliedanddesired. - merge_
vote - Copies the
Somefields ofpatchintovote, keepingvote’s other fields. - run_
governor - Main execution loop for an autonomous charge governor component. Never returns.