Revert "earysuspend: speedup late resume (faster wakeup of the device)"

This reverts commit e516da90d7a7274842a90d176322587c2aa98ce8.
Revert "CPUFREQ: update interactive to work with inputboost"

This reverts commit 7c0e9cc369400e4065007e71680a0575d57fd109.
Revert "input: touchboost: I've tried a gazillion different ways to deal with input cpu-boost events, but in the end what really works for me and flawlessly is leaving the governor taking care of the cpu frequency changes. I'd rather have a global input register handler that feeds the governor with the touch input times in usecs and leave the boosting logic to the governor. CAF's cpu-boost code is half broken too so I'm not bothering with trying it again."

This reverts commit 5b92d5e7809cb09552e969688645b4e0fea849cf.
Revert "Update cpufreq_interactive.c"

This reverts commit 49138b7cb08ca7f5c0e12553b750153ebb12bf34.
Revert "cpufreq: interactive: add changes to allow for input boost events."

This reverts commit 485880d369c7825a3add8cbe1b1ea59f478fd00a.
Revert "input: touchboost: add the same generic input time driver from my other Kernels."

This reverts commit 34324bb55762c6120a548b1281a5f4dd63d5fe03.
Revert "input: remove old boostpulse fd write crap."

This reverts commit d4b8699d6e398d29f77902778fc288e78ff23ace.
Revert "cpufreq: interactive: fix a wrong behavior of boostpulse freq and hispeed_freq. Also increased boosted time to 500ms and decreased hispeed_freq to 729MHz to make up for it."

This reverts commit 8015b75828721a5baeb8fbbfdf53d72017505332.
Revert "cpufreq: interactive: proper touch boost implementation, userspace PowerHal is disabled during boot."

This reverts commit 3dc78da4348c04fe4d92c534675198b47bd26a92.
Revert "OMAP4: DPLL cascading: Tune cpufreq interactive governor"

This reverts commit acb7cbc9f7c9c2d221e645cc4e908a56b0bcd372.

Conflicts:
	include/linux/cpufreq.h
Revert "cpufreq: interactive: sync android-3.0 with android-3.4"

This reverts commit b33b4fdbb36314cd625b453586cde0060c10a761.
cpufreq: interactive: take idle notifications only when active

Register an idle notifier only when the governor is active.  Also
short-circuit work of idle end if the governor is not enabled.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: I4cae36dd2e7389540d337d74745ffbaa0131870f
cpufreq: interactive: keep freezer happy when not current governor

Fix a problem where the hung task mechanism was deeming the interactive
clock boost thread as hung.  This was because the thread is created at
module init but never run/woken up until needed.  If the governor is not
being used this can be forever.  To workaround this explicitly wake up
the thread once all the necessary data structures are initialized.  The
latter required some minor code shuffle.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: Ie2c058dd75dcb6460ea10e7ac997e46baf66b1fe
cpufreq: interactive: handle speed up and down in the realtime task

Not useful to have a separate, non-realtime workqueue for speed down
events, avoid priority inversion for speed up events.

Change-Id: Iddcd05545245c847aa1bbe0b8790092914c813d2
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: remove input_boost handling

Now handled in userspace Power HAL instead.

Change-Id: I78a4a2fd471308bfcd785bbefcc65fede27314cf
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: always limit initial speed bump to hispeed

First bump speed up to hispeed_freq whenever the current speed is below
hispeed_freq, instead of only when the current speed is the minimum speed.
The previous code made it too difficult to use hispeed_freq as a common
intermediate speed on systems that frequently run at speeds between
minimum and hispeed_freq.

Change-Id: I04ec30bafabf5741e267ff289209b8c2d846824b
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: run at fraction of hispeed_freq when load is low

When load is below go_hispeed_load, apply the percentage of CPU load to
a max frequency of hispeed_freq instead of the max speed.  This avoids
jumping too quickly to hispeed_freq when it is a relatively low
percentage of max speed.  This also allows go_hispeed_load to be set to
a high percentage relative to hispeed_freq (as a percentage of max speed,
again useful when hispeed_freq is a low fraction of max speed), to cap
larger loads at hispeed_freq.  For example, a load of 60% will typically
move to 60% of hispeed_freq, not 60% of max speed.  This causes the
governor to apply two different speed caps, depending on whether load is
below or above go_hispeed_load.

Also fix the type of hispeed_freq, which was u64, to match other
speed data types (and avoid overhead and allow division).

Change-Id: Ie2d0668be161c074aaad77db2037505431457b3a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: change speed according to current speed and target load

Add a target_load attribute that specifies how aggressively the governor is
to adjust speed to meet the observed load.  New target speed is calculated
as the current actual speed (may be higher than target speed on SMP) times
the CPU load (as a fraction) divided by target load (fraction).

cpufreq_frequency_table_target() call use CPUFREQ_RELATION_L to set
the next higher speed rather than next lower speed.

Change-Id: If432451da82f5fed12e15c9421d7d27792376150
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: pin timers to associated CPU

Helps avoid waking up other CPUs to react to activity on the local CPU.

Change-Id: Ife272aaa7916894a437705d44521b1a1693fbe8e
Signed-off-by: Todd Poynor <toddpoynor@google.com>

Conflicts:

	drivers/cpufreq/cpufreq_interactive.c
cpufreq: interactive: use deferrable timer by default

Avoid wakeups only to handle the governor timer when the system is otherwise
idle.

For platforms where the power cost of remaining in idle at higher CPU
speed may outweigh the cost of a governor wakeup from idle to lower the speed,
set parameter cpufreq_interactive.governidle=1.

Change-Id: Id6c43eb35caecf9b0574fcdd5b769711bc7e6de6
Signed-off-by: LianWei WANG <a22439@motorola.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>

Conflicts:

	drivers/cpufreq/cpufreq_interactive.c