Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_kernel_oneplus_msm8974 into test
Revert "cpufreq: Fix broken uevents for cpufreq governor and cpu devices"

This reverts commit 0e2e59ea6389fdd90b17a154527a7392ac8851c3.
Revert "drivers: cpufreq: Send a uevent when governor changes"

This reverts commit 2f90a17c3c564964cd27efb25b4c56725c3ffb2c.
Revert "cpufreq: fix sleeping in atomic context when realloc freq_table for all_time_in_state"

This reverts commit bcfc518c897baa12f9086eee310df6d939d520fd.
Revert "cpufreq: Persist cpufreq time in state data across hotplug"

This reverts commit 328babfd463270b4eeaf9a0a04d68dfd84179487.
cpufreq: enable sibling cpu policy sharing

disable Qualcomm's cpu policy restore (conflicts with sibling sharing)

Change-Id: Ifdf9065e882478e83d4026943bb74ad2b5b70d92
Signed-off-by: Paul Reioux <reioux@gmail.com>
overall_stats: add overall stats for all available cores

this is much more accurate stats tracking than just displaying core 0's
stats from most other kernels

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

overall_stats: make dual/quad core stats configurable via meunconfig

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

overall_stats: forward port to kernel 3.4+

by replacing deprecated functions with native add/sub for 64bit data types

Change-Id: I1e17d626bf59b3c0822c9f1088093f848fd2649c
Signed-off-by: faux123 <reioux@gmail.com>
Cpufreq: create/remove percpu sysfs nodes once

On cpu hotplug on/off, percpu "cpufreq" sysfs node and it's
sub nodes are freshly created and removed. This increases
cpu up/down latency.

Create percpu "cpufreq" sysfs node and it's sub nodes in driver
registration and remove it in unregistration. This decreases
cpu up/down latency significantly.

Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-on: http://git-master/r/146812
(cherry picked from commit 298382285677fa791098d117ccc0a0a3d9ab0f9a)
Reviewed-on: http://git-master/r/219379
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

modified for use on Mako by faux123

Change-Id: I9ce700a3a27878d6072d33a303ed2ca1c6e9b198
Signed-off-by: Paul Reioux <reioux@gmail.com>
powersuspend: new PM kernel driver for Android w/o early_suspend

Android early_suspend/late_resume PM kernel driver framework has been
deprecated by Google. This new powersuspend PM kernel driver is a replacement
for it and existing early_suspend drivers can be easily adapted to use this
new replacement driver

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

Conflicts:
	kernel/power/Kconfig

powersuspend: fix logci derps :p

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

kernel/power/powersuspend: remove userspace dependency from powersuspend

make powersuspend not depend on a userspace initiator anymore, but use a hook
in autosleep instead.

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

kernel/power/powersuspend: add back userpace control w/ default kernel control

make kernel / userspace mode switchable

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

kernel/power/powersuspend: default to userspace for now

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

kernel/power/powersuspend: LCD screen on/off hooks (Yank555.lu)

- add an alternative hook for screen on / off detection in the display
  pannel driver
- sleeps  ~0.1s sooner, wakes up ~1s later then autosleep
- clean up source formatting a bit (Paul Reioux)

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

kernel/power/powersuspend: cumulative update to version 1.5

- fix hybrid-kernel mode cannot be set through sysfs

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.4 (Yank555.lu)

- add hybrid-kernel mode (autosleep and panel, first wins)
- default to hybrid-kernel mode
- harmonize debug message with my other stuff
- include all 3 modes as default, so it's only commenting out to change

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.3 (Yank555.lu)

- fix stupid typo
- add an alternative hook for screen on / off detection in the display panel driver
(sleeps ~0.1s sooner, wakes up ~1s later then autosleep)

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.2 (Yank555.lu)

- make kernel / userspace mode switchable

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.1 (Yank555.lu)

- make powersuspend not depend on a userspace initiator anymore, but use a hook in autosleep instead.

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend (faux123)

Android early_suspend/late_resume PM kernel driver framework has been
deprecated by Google. This new powersuspend PM kernel driver is a replacement
for it and existing early_suspend drivers can be easily adapted to use this
new replacement driver

Change-Id: I3400b596ee988cc6f7beb4e8d0c60a003afde2bb
Signed-off-by: Paul Reioux <reioux@gmail.com>
intelli_plug: refactor stats calculation code to be less intrusive

this is done for those kernels which do not have 100% source code available
and must use existing closed source modules such as wifi drivers

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

Conflicts:
	arch/arm/hotplug/intelli_plug.c

Change-Id: I7ebd99b4fb3b55c0a39d64448e86c57cac6acaea
Intelli_plug: kernel sched/core: add per cpu nr_running stats

Change-Id: I4e8ed76e27c63270b3d106de1b85a52bb0bbe822
Signed-off-by: Paul Reioux <reioux@gmail.com>
Intelli_plug: cumulative patch to version 3.8

An intelligent hotplug driver for ARM based SOCs.
Copyright 2012~2014 Paul Reioux (aka Faux123)

Change-Id: Ic5e539be262d298255d50ef8835afe80c489aef9
Signed-off-by: Paul Reioux <reioux@gmail.com>
cpufreq: revert CAF's cpu policy save code

this code is deprecated by sibling cpu policy sharing

Change-Id: Icde1cc84da03ca1571b64fa52d54dffa2a57981e
Signed-off-by: Paul Reioux <reioux@gmail.com>
defconfig update
LCD_KCAL: Color Control driver for OnePlus One

Change-Id: I6adb94c00ae689236a618cca73fbe3dec80a3c7f
LCD_KCAL: Introduce configurable kcal_min
Lower values such as 0-10 ultimately create a dark, washed out display,
if a user accidently sets their kcal values to "0 0 0" they will loose
visual control of the device, potentially requiring a hard reboot.
Introduce minimum kcal values to prevent this behavior.

Willing users can disable this protection by setting the kcal_min value
to '0', however the default value of 35 is recommended.

sysfs:
echo "1/255" > /sys/devices/platform/kcal_ctrl.0/kcal_min

kcal_min will detect and block values attempting to set lower than
itself, resetting the specific values to that of kcal_min. There is also
behavior to adjust the kcal if kcal_min is set to a level higher than
that of any kcal value(s).

Change-Id: I4c1bba5f157560d2f160b7667d3618e87b5c2131
LCD_KCAL: Prevent out-of-range input values

Change-Id: I25be4b6e678ef9a4be17b4a30f5f30bdb99c7c59
kcal: remove control bit, update lut every overlay start and clean some code.

Change-Id: I815d46e54ebeea6d8310f028d5dd89fc0f574f5a
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
board: kcal: add init values or the display boots completely black.

Change-Id: I4139ca1112b0830f6f02205c23e689b623d08c36
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mdss: overlay: bye logs, was (not) nice to meet you.

Change-Id: I74c085af303d963db8bca05d1bd89eab6d81afe9
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>