Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ff4ac62 authored by Francescodario Cuzzocrea's avatar Francescodario Cuzzocrea
Browse files

universal8890: power: fix profile switching



 * also stop switching between balanced and power save when we are in
   non interactive state, as this can potentially override whatever the
   user set in battery settings

Change-Id: I09246659749e7b9e5dd27c604ca54613e0a0a7e3
Signed-off-by: default avatarFrancescodario Cuzzocrea <bosconovic@gmail.com>
parent c81f8126
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -70,8 +70,6 @@ out:

    set("/sys/power/cpuhotplug/max_online_cpu", interactive ? "8" : "6");

    setProfile(interactive ? PowerProfile::POWER_SAVE : PowerProfile::BALANCED);

    return Void();
}

@@ -146,7 +144,7 @@ Return<int32_t> Power::getFeature(LineageFeature feature) {
void Power::initialize() {
    findInputNodes();

    current_profile = PowerProfile::BALANCED;
    setProfile(PowerProfile::BALANCED);

    for (const std::string& interactivePath : cpuInteractivePaths) {
        hispeed_freqs.emplace_back(get<std::string>(interactivePath + "/hispeed_freq", ""));
@@ -217,6 +215,8 @@ void Power::setProfile(PowerProfile profile) {
        default:
            break;
    }

    current_profile = profile;
}

void Power::sendBoostpulse() {