mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-11-06 21:55:41 +00:00
power: Cleanup hint handling
Change-Id: I828a68105272fef3fe454561d98825f8703bca0b
This commit is contained in:
parent
15b63090f2
commit
2981f792c4
1 changed files with 15 additions and 12 deletions
|
@ -209,6 +209,9 @@ static void set_power_profile(struct samsung_power_module *samsung_pwr,
|
|||
}
|
||||
ALOGV("%s: set performance mode", __func__);
|
||||
break;
|
||||
default:
|
||||
ALOGW("%s: Unknown power profile: %d", __func__, profile);
|
||||
return;
|
||||
}
|
||||
|
||||
current_power_profile = profile;
|
||||
|
@ -415,29 +418,29 @@ static void samsung_power_hint(struct power_module *module,
|
|||
}
|
||||
|
||||
switch (hint) {
|
||||
case POWER_HINT_INTERACTION: {
|
||||
case POWER_HINT_VSYNC:
|
||||
ALOGV("%s: POWER_HINT_VSYNC", __func__);
|
||||
break;
|
||||
case POWER_HINT_INTERACTION:
|
||||
ALOGV("%s: POWER_HINT_INTERACTION", __func__);
|
||||
send_boostpulse(samsung_pwr->boostpulse_fd);
|
||||
break;
|
||||
}
|
||||
case POWER_HINT_VSYNC: {
|
||||
ALOGV("%s: POWER_HINT_VSYNC", __func__);
|
||||
case POWER_HINT_LOW_POWER:
|
||||
ALOGV("%s: POWER_HINT_LOW_POWER", __func__);
|
||||
set_power_profile(samsung_pwr, PROFILE_POWER_SAVE);
|
||||
break;
|
||||
}
|
||||
#ifdef POWER_HINT_CPU_BOOST
|
||||
case POWER_HINT_LAUNCH:
|
||||
case POWER_HINT_CPU_BOOST:
|
||||
ALOGV("%s: POWER_HINT_LAUNCH | POWER_HINT_CPU_BOOST", __func__);
|
||||
boost((*(int32_t *)data));
|
||||
break;
|
||||
#endif
|
||||
case POWER_HINT_SET_PROFILE: {
|
||||
int profile = *((intptr_t *)data);
|
||||
|
||||
case POWER_HINT_SET_PROFILE:
|
||||
ALOGV("%s: POWER_HINT_SET_PROFILE", __func__);
|
||||
|
||||
int profile = *((intptr_t *)data);
|
||||
set_power_profile(samsung_pwr, profile);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ALOGW("%s: Unknown power hint: %d", __func__, hint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue