Skip to content

azalea/lotus: CHG_LIMIT_GET_LIMIT disables override #42

Open
@DHowett

Description

@DHowett
Contributor

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

if (p->modes & CHG_LIMIT_GET_LIMIT) {
system_get_bbram(SYSTEM_BBRAM_IDX_CHARGE_LIMIT_MAX, &charging_maximum_level);
r->max_percentage = charging_maximum_level;
args->response_size = sizeof(*r);
}

lotus

if (p->modes & CHG_LIMIT_GET_LIMIT) {
system_get_bbram(SYSTEM_BBRAM_IDX_CHARGE_LIMIT_MAX, &charging_maximum_level);
r->max_percentage = charging_maximum_level;
args->response_size = sizeof(*r);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @DHowett

        Issue actions

          azalea/lotus: CHG_LIMIT_GET_LIMIT disables override · Issue #42 · FrameworkComputer/EmbeddedController