Revert " omit contents push"

This reverts commit 66255dfdd2acaef63dc6119ed76388cb3edf3b99.
Revert "Add Governor"

This reverts commit 1b4c01f9a02948b5ce15824191392d5c785ccd61.
cpufreq: Add pegasusqplus governor

This is an adaption of the pegasusq governor from Perseus Samsung JB kernel.

All credits to AndreiLux.

Conflicts:
	drivers/cpufreq/Kconfig
	drivers/cpufreq/Makefile
pegasusqplus: introduce firelock
pegasusqplus: enable full frequency table usage

By removing FREQ_FOR_RESPONSIVENESS, we are able to use full frequency table.
(including low freqs like 100 MHz ~ 500 MHz)

By doing this, we can also expect some gain in energy efficiency.
pegasusqplus: push CPU frequency to maximum on late_resume

To hopefully help speeding up resuming.

Taken from yankasusq, a governor based on pegasusq by yank555-lu
pegasusqplus: introduce firelock
pegasusqplus: enable full frequency table usage

By removing FREQ_FOR_RESPONSIVENESS, we are able to use full frequency table.
(including low freqs like 100 MHz ~ 500 MHz)

By doing this, we can also expect some gain in energy efficiency.
intelliactive: backport to Linux 3.0.x / Linux 3.1.x kernels
cpufreq: intelliactive: initial coding and introduction!

intelliactive is based on Latest Google Interactive cpufreq governor from
Google.  The original Interactive provides smooth UI operations but suffers
slight battery drain due to its aggressive policies.  Intelliactive is an
improvement built on top of it.

It has the following enhancements added:
1. self-boost capability from input drivers (no need for PowerHAL assist)
2. two phase scheduling (idle/busy phases to prevent from jumping directly to
   max freq
3. Checks for offline cpus and short circuits some unnecessary checks to
   improve code execution paths
4. removed trace calls

All credits to Faux123

intelliactive: fix race condition when unregistering input handlers

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/cpufreq/Kconfig
	drivers/cpufreq/Makefile
	include/linux/cpufreq.h
pegasusqplus: enable full frequency table usage

By removing FREQ_FOR_RESPONSIVENESS, we are able to use full frequency table.
(including low freqs like 100 MHz ~ 500 MHz)

By doing this, we can also expect some gain in energy efficiency.
cpufreq: Manage only online cpus
Fix memory leak in cpufreq stats.

commit e37736777254ce1abc85493a5cacbefe5983b896 upstream.

When system enters sleep, non-boot CPUs will be disabled.
Cpufreq stats sysfs is created when the CPU is up, but it is not
freed when the CPU is going down. This will cause memory leak.

Signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
Signed-off-by: guifang tang <guifang.tang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Colin Cross <ccross@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cpufreq & hotplug updates

CPU hotplug, writeback: Don't call writeback_set_ratelimit() too often during hotplug

The CPU hotplug callback related to writeback calls writeback_set_ratelimit()
during every state change in the hotplug sequence. This is unnecessary
since num_online_cpus() changes only once during the entire hotplug operation.

So invoke the function only once per hotplug, thereby avoiding the
unnecessary repetition of those costly calculations.

Change-Id: I9d13e74a60632bf079faebb80477ce86121f1a8c
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
cpufreq: Resolve CPUFREQ_NOTIFY issue

When the cpufreq_stat receives the frequency policy notification,
it checks if the frequency table and stats table are present for the cpu.
If both are present, it returns with -EBUSY error to the notification.
Due to this, none of the other registered modules receive this
notification.

If the stat table and sysfs nodes are already created, return 0 instead
of returning EBUSY error.

Change-Id: I1fd4a46e6a65edfc6253c4271288f10912ae2ad7
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
cpufreq: Retain only online cpus in managed_policy->cpus

cpufreq's handling of cpu online event can incorrectly initialize
managed_policy->cpus to include offline cpus. This causes cpufreq
governors to include offline cpus in their idle time computation, which
causes frequency to shoot up beyond normal levels (on systems where 2 or
more cpus need to be synchronized wrt frequency change).

This frequency shootup was not seen prior to commit 21111be8 which
changed idle time accounting for offline cpus. Prior to commit 21111be8,
idle time statistics for offline cpus would include their offline time
as well. Post commit 21111be8, offline time is not included in a cpu's
idle time statistics.

As a result, ondemand (or other cpufreq) governors would see unchanged
idle time for offline cpus, causing them to interpret those (offline)
cpus as 100% busy, which is wrong.

This patch fixes the issue by modifying cpufreq's hotplug handling to
retain only online cpus in managed_policy->cpus field. cpufreq governors
would then skip such offline cpus from idle time calculations.

Change-Id: Id2eba8c0ec3367609369b2e42a4e1386ff2e7ab5
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Implemented CPU OC & UV support (1.8 GHz)
CPU OC: Corrected CPU freq. going above scaling_max (even if only fractions of seconds)
Dynamically adjust cpufreq_max_limit according to scaling_max setting without breaking power save mode
cpufreq: Add cpu-boost driver

When certain bursty and important events take place, it might take a while
for the current cpufreq governor to notice the new load and react to it.
That would result in poor user experience. To alleviate this, the cpu-boost
driver boosts the frequency of a CPU for a short duration to maintain good
user experience while the governor catches up.

Specifically, this commit deals with ensuring that when "important" tasks
migrate from a fast CPU to a slow CPU, the frequency of the slow CPU is
boosted to be at least as high as the fast CPU for a short duration.

Since this driver enforces the boost by hooking into standard cpufreq
ADJUST notifiers, it has several advantages:
- More portable across kernel versions where the cpufreq internals might
  have been rewritten.
- Governor agnostic and hence works with multiple governors like
  conservative, ondemand, interactive, etc.
- Does not affect the sampling period/logic of existing governors.
- Can have the boost period adjusted independent of governor sampling
  period.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>

Change-Id: Ibd814a20043d0aba64ee7637a4a79b9ffa1b0991
cpufreq: Add a sync limit to cpu-boost

Perform frequency synchronization only when source CPU's frequency
is less than sync_threshold, else sync to the sync_threshold.

Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>

Change-Id: I544c414568d4e015b80ce5891dd215275bac95da
cpufreq: Add sysfs interface to read Exynos asv_level (andip71)
sound/soc/codecs: Implemented Boeffla Sound v1.6.4

Boeffla-Sound: Engine 1.6.4
- show settings in sysfs even if boeffla sound is switched off
- remove legacy interfaces for alternative eq settings + mic mode
- some code cleanup

Boeffla-Sound: Engine 1.6.3
- delayed apply of changed register settings (credits to Yank) to
  fix issues on CM
- delay time configurable via sysfs (credits to Yank)
- different headphone detection for s3 and note devices
- different call detection

Conflicts:
	sound/soc/codecs/wm8994.c
Boeffla-Sound: Engine 1.6.5

- allow speaker minimum level of 20
Boeffla-Sound: Engine 1.6.6

- allow minimum volume of 0 for both speaker and headphones