intelli/msm_thermal: initial coding for Qualcomm Snapdragon 800 devices

an intelligent MSM thermal throttling kernel driver designed to replace the
closed sourced thermald(aemon) from Qualcomm.

The current driver can throttle the SOC via core frequency scaling or via
core hotplug with user configurable sysfs entries to adjust the throttling
temperature thresholds for each.

Derived from Qualcomm's Open source repo.

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

Conflicts:

	arch/arm/mach-msm/lge/board-8974-hammerhead.c

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

Conflicts:
	drivers/thermal/Makefile
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
board-8226: initialize intelli_thermal engine

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: kgsl: show current power level for 8974 SOCs.

since 8974 uses duplicate frequencies in its table, it's not possible to tell
which of the duplicates is actually in use

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@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.

Change-Id: I5c2b02e74de0ae4fe08dedc959bd7402cd9b7aa5
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

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
intelli-thermal: fix board 8226 merge error

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
intelli-thermal: use its own dedicated workqueue

this should reduce the load on the shared global workqueue for other
processes and also give its own unique variable name for cpu limit

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
intelli-thermal: increase sampling time to reduce sampling overhead

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
drivers/thermal/Kconfig: fix default prompt error

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
intelli_thermal: compatibility fixup with latest msm_thermal driver

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: cpufreq: Add API to allow limiting of min and max cpu
 frequencies

CPUFreq provides scaling sysfs nodes to set min and max frequencies, but
there are times when the operating range has to be controlled
irrespective of the scaling limits, to ensure the thermal stability of
the device.

The API allows kernel thermal safeguards to pitch in and limit the
frequencies.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Revert "Cpufreq: create/remove percpu sysfs nodes once"

This reverts commit 64c78f897cd9f0fe5383866d995f01ba4021770b.