On Monday, December 10, 2012 11:09:58 AM Julius Werner wrote:
Hi,
What is the current status of this? Daniel, do you think you have got enough feedback to submit a definitive patch for this? Rafael, would you approve of such a change?
I need to talk to Len about that before I give you a reliable answer.
Thanks, Rafael
The bug with dynamically added C-states that is tied to this still hurts the battery life for some users across all distros every day, so I think it would be valuable to get a consistent solution into the mainline soon before everyone has to roll their own.
On 11/12/2012 09:26 PM, Daniel Lezcano wrote:
This patch follows the discussion about reinitializing the power usage when a C-state is added/removed.
https://lkml.org/lkml/2012/10/16/518
We realized the power usage field is never filled and when it is filled for tegra, the power_specified flag is not set making all these values to be resetted when the driver is initialized with the set_power_state function.
Julius and I feel this is over-engineered and the power_specified flag could be simply removed and continue assuming the states are backward sorted.
The menu governor select function is simplified as the power is ordered. Actually the condition is always true with the current code.
The cpuidle_play_dead function is also simplified by doing a reverse lookup on the array.
The set_power_states function is removed as it does no make sense anymore.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org
drivers/cpuidle/cpuidle.c | 17 ++++------------- drivers/cpuidle/driver.c | 25 ------------------------- drivers/cpuidle/governors/menu.c | 8 ++------ include/linux/cpuidle.h | 2 +- 4 files changed, 7 insertions(+), 45 deletions(-)