revert to intelli_thermal
change thermal to stock one
Revert "intellithermal v2: adapt for MSM8226 architecture"

This reverts commit 1b1ef216548c8ba61b7accfa5e4a766893c360df.
Revert "intelli-thermal v2: initial adaptation"

This reverts commit bdfbfe0281da0c596ea43b03d593808c470ade08.
reverted intelli_thermal_v2

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Merge https://github.com/Team-PAradox/android_kernel_motorola_msm8226 into pruebas

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>

Conflicts:
	arch/arm/configs/msm8226_mmi_defconfig
Merge branch 'kitkat' of https://github.com/Team-PAradox/android_kernel_motorola_msm8226 into pruebas
ct406: Fix Prox sensor enable.

Fix a race condition when prox and als sensors are enabled at the
same time. This can cause the prox state to not be reported.

Change-Id: Ic553ccd17cd42c9a1a65e6456527942e604e6ded
Signed-off-by: Robert Wiegand <qa2113@motorola.com>
Reviewed-on: http://gerrit.mot.com/646158
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-by: Jagatkumar Shah <jagat@motorola.com>
Reviewed-by: Manasa Guntaka <mguntaka@motorola.com>
SLTApproved: Robert Neely <wrn002@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit 811356bcd83e1328f9e5f5e1a4ef65935f3d9b60)

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
arm/dts: batterydata: Add ED30 Sony

Add the ED30 Sony Battery Data and then setup the
the products to use the data that are capable of
getting the ED30 batteries.

Change-Id: I5353de17f1b57496261ddc1c8f5d5814ae310f6b
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: http://gerrit.mot.com/651461
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jason Knopsnyder <jasonk@motorola.com>
SLTApproved: Christopher Fries <cfries@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit fbc3ddb0e70536ce833705a3751c69cafd25e863)
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
arm/dts: batterydata: 0C for ED30 Sony

The Table is missing the 0 C row.  This prevents the
profile from loading correctly.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ext4: Speedup WB_SYNC_ALL pass called from sync(2)

When doing filesystem wide sync, there's no need to force transaction
commit (or synchronously write inode buffer) separately for each inode
because ext4_sync_fs() takes care of forcing commit at the end (VFS
takes care of flushing buffer cache, respectively). Most of the time
this slowness doesn't manifest because previous WB_SYNC_NONE writeback
doesn't leave much to write but when there are processes aggressively
creating new files and several filesystems to sync, the sync slowness
can be noticeable. In the following test script sync(1) takes around 6
minutes when there are two ext4 filesystems mounted on a standard SATA
drive. After this patch sync takes a couple of seconds so we have about
two orders of magnitude improvement.

      function run_writers
      {
        for (( i = 0; i < 10; i++ )); do
          mkdir $1/dir$i
          for (( j = 0; j < 40000; j++ )); do
            dd if=/dev/zero of=$1/dir$i/$j bs=4k count=4 &>/dev/null
          done &
        done
      }

      for dir in "$@"; do
        run_writers $dir
      done

      sleep 40
      time sync

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Enhance power efficiency:
Series of patches from NVIDIA on some critical blocking
code paths to allow the CPU to relax instead of busy spinning
thus lowering the load_average and lowering power consumption.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Adaptive governor

This driver adds a dynamic cpufreq policy governor
designed for latency-sensitive workloads and also for demanding
performance.
This governor attempts to reduce the latency of clock
increases so that the system is more responsive to
interactive workloads in loweset steady-state but to
to reduce power consumption in middle operation level level up
will be done in step by step to prohibit system from going to
max operation level.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq: Nightmare governor

A PegasusQ modified, less aggressive and more stable. A good compromise between performance and battery.
In addition to the SoD is a prevention because it usually does not hotplug.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Added abyssplug and added some fixes for abyss
some changes on Nightmare gov

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Add support of kcpustats insteat of kstat_cpu

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
updated nightmare gov for propper build on 3.xx kernel
and some fixes for falcon

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM:msm Hotplug: Experimental Klozz_hotplug
New generic plug for ARM SoC's

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
updated klozz_hotplug

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Added new gobernor Alessa
PS2:[PATCH 1/2] cpufreq: Introduce new relation for freq selection
PS3: workqueue: make deferrable delayed_work initializer names consistent
PS4: Alessa gob updates to make more customizable

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>