SQUASH:mpdec and thermal from showp

drivers: thermal: create kernel thermal readout

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 3d4c41995484a8b4c09ee542d14b970119de6669)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit fa2bde7604882a87d2406ccbf64a32a2d1559685)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: patch down msm_thermal, pre device

This also removes the cputable freq changes, which
we won't need since we use static values.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c
	include/linux/msm_thermal.h

(cherry picked from commit 7c769abfce7c246cf77593d83e5647d207709d32)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c
	include/linux/msm_thermal.h

(cherry picked from commit 31d4ce2f40824ebabc909fc6f06f2b8297ed7412)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: 3-phase thermal throttling

This introduces 3-phase thermal throttling to the existing
msm_thermal driver (it now works more like thermald).
This also changes the sampling rate to check every second
for increased temperatures.
Additionally this adds clear thresholds for the 2 new tripping
points.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 0836330a11dd55ea31468c3c0fcfc8fcd9893a10)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 1c959ea425c79b0dc480b038b832a8458f98289c)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: add sysfs interface

This adds a sysfs interface to msm_thermal.
I've also restructured the tuneables into a struct
for better overview.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 5c1930018ef61c51f932e5f6fa48f0cab8adf7e6)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit 9ab9512c34b8b9ea48e4730a9b84b5fddc97a193)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: move sysfs to /sys/kernel/msm_thermal/conf/

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 64937e8ac1ec715dbcfc21ac02ef891db4d53d36)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 8633737914d3fe7b3a292b9df6a6e9dba0a82c5c)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

more patching down, was wondering why i was getting a lot of errors

Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 6960086f055f92938a03a30466484758ade5190b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: fix saving pre-throttled freq

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit ad7f5296a0a138b9f62788f11dc791b4ead764e6)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 28577f087514cc5ee55c844362d6bcd73bd2fd56)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

drivers/thermal: create own unbound (highpri) wq for msm_thermal

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 91820a5a0ab957ff4ccd9a5d10d8c0903d938b16)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 3102b960b9f92abc52fa4f4dae3c968c8b13e1ba)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

drivers/thermal: add emergency shutdown

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 1cf3d6bdce2fc5de08ebbb2893ef3f47372b98f3)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 863dc5f7c2ee26a0f3e0ab048fa2b892226452c3)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

this is a temporary fix for now

Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit d009760b553b9c1c7369be17916b38f181d7b175)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: emergency shutdown rework

additionally to initiating the shutdown the lowest possible
frequency should be set. (=max throttle atm)
update the cpufreq and do not cancel the workqueue
+ some small code improvements

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 7ab7834b812cebac9150b063e317dfb07e66af4e)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit 2b98b6487233c35a26535de1297760caa0c5e097)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: use temperature1 sensor too
The sensor1 seems to be cpu related too, and it usually
shows higher temps (~2°C). Use the higher value of both
to decide if thermal throttling is neccessary.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 00856e249b5ccdce3bbf52ae36875a5e457e0557)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit a3cc8e230b5e2d348ca436d674a33e96e4d3f1cb)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: do not wait, unthrottle now

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 27091abc5be79dcad07cbccbb71c4759d1a70194)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit 5bdefa65242d353379cd2535b5b28f86e7ecc4aa)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: remove not needed condition

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit 5d1cd7452a6719ad45f580b9cc441026a0c936e4)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit c32a56ded53838cb30c1620265022d889cf72048)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: fix clear thresholds

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit c4d06e18c2a8a0c9e2992b4102e0df8356208f20)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 87ff29432987b4fe2a6e98ffa8e7f5d7bbe0e046)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: only update freq if new is not > than saved_max

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 6e4618d53c72eb33b5304d8da6060c7f234a65f4)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit d561199195642d7a827b5c7e0a28fe80b9ecdb83)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: rework throttling states

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 0782ee75778c0f9d9286463150eb6dd26871032d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit c94a133d72bf46eec6d5510d57a9c3637a99e6ba)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: set cpus online to set frequency back to unthrottled

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit f5ef0a37f9e112fd3bf8caa87495471e4b41aa71)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit da1a3da3bb16776004d7b73e9989533bf5861071)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: fixing debug messages

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit ee199c5ba876e7552c99e07c8090bddb185b7cfc)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 92042bd175a6ba4d8f34fce0f293b168386279f1)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: fix mid scaling

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit bd3dd463ec94e8db3f9994ae93f9d541547b526f)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
(cherry picked from commit 6243b0f3d77189c2b382082e6582f3446329244b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: don't calculate max everytime, once is enough

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 71bba5b1be8e8b275109f9ef23a782c5efb38f66)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: fix hardware issue with temp sensor 1

Ignore insane values and also ignore sensor 1 in suspend.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 47e66ee8b7645a4262d8f41a065664919905438d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: assume that sensor1 fails as default

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 649cf94b49507edf2ebf89c6219159335060248f)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm8960_tsens: enable all thermal devices

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm8960_tsens.c

(cherry picked from commit 60d97c580f4ad71bdcbcdf4c931077b292366c0c)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: patch to upstream

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit 15d53a8ee519fd420c0e131af9fe4645f153713a)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

thermal: update upstream msm_thermal with 3-phase control

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

(cherry picked from commit e748bf73f3a8d0b45f392b11b0b4ad036d6a3184)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: check every 150ms

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 4b23429a3589d2b59ed24d24a921b1c223084129)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: fix previous lazyness

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 9a9d402ac4a236bf2f9b488e2e73935002c51991)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: export if we are currently throttled

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit c28c1ae4bcb6018d51171ba6f4bfe6c872b1e308)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: fix spacing throughout the whole file

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 65bcc66105eb207a4f81ce918aa870a3839ed7ac)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: add stats for throttling

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit b13b816a8ff2a97dd38a721d302ff4d33096a450)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: Fix critical enable/disable bug from STOCK source
This fixes a critical bug which only allowed to disable the thermal guard
but not to re-enable it again. Once disabled the thermal guard would stay
off until rebooted. This allows to re-enable it again. (sysfs)

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 32ce9c67177213f0fe1aad346914874317cf5c14)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_thermal: enable msm_thermal

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 73fe91e3f9cbc6bdf1481f40ca97ec9c223314eb)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: SQUASH mpdecision from showp

Signed-off-by: showp1984 <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:

	arch/arm/mach-msm/Kconfig

(cherry picked from commit ee7983b76e9b79b1e909606273b7bd84248f61c0)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: Add msm_mpdecision

This currently only does the following thing:
Screen on -> CPU1 online
Screen off -> CPU1 offline

More to come.

Signed-off-by: showp1984 <showp1984@gmail.com>

Conflicts:
	arch/arm/mach-msm/msm_mpdecision.c

(cherry picked from commit da1cb3be9bdfcd92e6458367540b5f601919f471)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/mach-msm/msm_mpdecision.c

mach-msm: mpdecision: small cleanup

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 36ddd194bf94e2c462faa7f2da907e28d6d5f193)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: add load based decision making

This now works like the mpdecision binary from QCOM.
CPU hotplugging/unplugging based on system load.

A sysfs interface will be built in with a later commit.

Signed-off-by: showp1984 <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/mach-msm/msm_rq_stats.c

(cherry picked from commit 58f29dd427ef713d88e3ab8d509ab209dcd76a9a)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: restructure locks, add delay

The new delay allows the CPU to come up before any other action is taken.
This prevents fast plugging and also ensures the CPU hotplug process
is really done, before trying to unplug it again (or plug it).

The new locks are more efficient, and only used if necessary.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit e80d5b1ee56efcc98060c37294e36add38db61e9)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: pause if CPU is unplugged outside of mpdecision

This fixes cpu wars if something else tries to control the cpus.
default delay: 10000ms

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 011c21370df32684e543d96c9f99168b4908db3a)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: change early_suspend_level to blank_screen

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit da8baea92ae3c5319cf284485f6db3ce61af8af1)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: don't start immediately

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 9f2f896fb382374d854c70e0b3d9ef6c434f3de6)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: show cpumask after up/down

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 02eea3fad22837a3a37447b142e85ac42c7c7399)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: always set the suspend var

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit db95d7f6c0dc58ad53e2d94c912b84e3d2f20ac8)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: remove up/down delay, our default delay is large enough

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit b619eca3e542918c253622e59552458af6635034)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: add email to (c)

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 730b96c54fd3b75def71ba8a77a7d02bd0fde4e5)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: fix foreign hotplug/unplug detection

Signed-off-by: showp1984 <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:

	arch/arm/mach-msm/msm_mpdecision.c

(cherry picked from commit c23db411c7de84d7a7f18ef27ded519af8268194)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: show how long the cpu was online

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 4b97288850248aaf8fb963a37a3edc675ef43a39)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: rename msm_mpdec_suspend to msm_mpdec_cpudata

Since this is being used for more than suspend stuff the old name
just isn't accurate anymore.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 0de6c63e6e18182c6faf7d6edbc3c2cdf05c28a6)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: add sysfs interface

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit a54013329f1ce160ce98481dc81e81955d5342c6)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: remove debug output

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 586bb5699b60d62416c0e138abdc5015a2d2f94d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: increase startdelay for sense

Surprise! Sense needs a lot longer to boot up than aosp...

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 6212603307114f751c8294347ef3b53940bb7974)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: adjust thresholds for sense

Sense is just too hungry...

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 6bab3cc9a6aab282f909cd4c98a8956b66fe557f)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: fix foreign cpu control detection

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit a05959db3c8888d1cad603de965616e406a38052)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: allow mpdecision to be disabled (sysfs)

This allows disabling/enabling of mpdecision over sysfs.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 9208f6d8d1efdb173bf0a5e341eece755aef1753)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: increase start delay for Sense

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit b9829a3015a84c47242d8751221521da459474bb)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: increase up threshold for Sense

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 25f40c27a201ca60501d0cc10cd6828d161802b5)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: sysfs: check if cpu is offline before hotplugging it

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit b4972b86f82b9fee988d34a49ecb2dee80a4f586)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: don't turn off cpu1 if freq > idle

This fixes cpu1 being turned off though it is still working
with a high frequency. The idle_freq can be modified through sysfs.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit d660ea46ca28feaa9db5f22bbf11f6d131942d5f)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: fixup: move idle block to mpdecision()

This belongs in mp_decision() because this influences the decision
mpdecision is about to make.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 9dafa14e7e5f7a68f0fe8c6762b7eecc53eddad5)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mach-msm: mpdecision: don't turn on cpu1 if cpu0 freq is below idle_freq
If the clock of cpu0 is below the set idle_freq don't enable cpu1 and
disregard the runqueue value.

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 699fbb8ce9446973023211db18987ca51dddaf73)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix check for khz/mhz value (idle_freq sysfs)

Signed-off-by: showp1984 <showp1984@gmail.com>
(cherry picked from commit 6c43fc3767448d461e2a7acb6f17c8ef8f0034f7)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add debug output

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit ad6c5c2ad0815dbbcd62f392829b9595dd9cfe23)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: make mpdecision() core independent

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 662757ca2d1ced89bbaa61afca0a31342e608786)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: make msm_mpdec_work_thread() core independent

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit ea2fd0457a5d837f6699e825a2133159ee9048e7)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix get_slowest_cpu()

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 5990ed99a6eceeba7cb40ad9a7654770bf633a6b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: make debug output more compact & informative

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit f94081193af51fb7def56d1fb7effcc97fef9d56)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: decrease startup delay

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 09ff6aa808e919eb88ea04ea7680f46f15e58c04)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: decrease decision delay

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 0e62bbb45eb32be9ecd480408b5a85798d401b7e)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: update core data on first call

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 36100e5e62a19236f5220d4fe534a169aad942ad)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: don't let msm_mpdec_work_thread() run if we are still booting

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 79893661817fdc2960f40e409e26598e3715daee)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: make earlysuspend/lateresume core independent

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 630141506d01315ba73eaa33a887e8dea5226da6)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: update header to include full feature list

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 2da3fdac1163ac23f35e9e9ce3c0126713d4cad1)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: export the new, larger nwns/twts arrays to sysfs

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 9fdca150f17b230be32ee1f937e4dc266343a432)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix disabling mpdecision over sysfs for multicore

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 1401f1ac6700e5a25b6cd028f43def15079744ac)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: remove useless locking

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 027723738b9722cafbf1d6cefa1d0bd405bac42e)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: use own workqueues

This will alter mpdecision to alloc it's own wq rather than using
the predefined queue which is a shared resource.

The WQ is not bound to the issuer CPU (=high-priority), has a
rescue worker task and is freezable.
Also destroy the workqueue on exit, and rename msm_mpdec to
msm_mpdec_init.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit bafd5f19acaa282cda8f476b6366618d2e19f880)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: cancel/resume main work thread on ES/LR

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 5c177acf3817c2beaf10f520eaaa925291cc55f5)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: use unique lock names

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 7dc0cbdeb0412d4839aca7249a2a98151960a330)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add max/min cpu limits to sysfs

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 744dc47257cd9128e49909fa6a78eeb964fadb33)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: use CONFIG_NR_CPUS for max_cpu sysfs

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 47a659ebcda6bf995648d45688d1d6b405639365)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: decrease delay between checks to 70ms

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit ef4d3651b610c77e4be5fddb36fcaa2579e7554d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add get_rate()

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit c7177484ed504e46ff1635506fd89320b6d97e13)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix merge errors

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 1dcec8eaea060a9089bf6ad670ecd5ac7fda6928)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: various fixes and tweaks

- fix get_slowest_cpu_rate(): don't cut off rate to int
- fix get_slowest_cpu_rate(): don't use values from an offline cpu
- fix get_slowest_cpu(): don't return cpu0.
- tweak hotplug thresholds

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit aaeabdff63cbcf0036fd3b88548c51f5bd03c087)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: disable debug

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 8575d4a93f2699f3fc3dcb16f9d465c3097895bb)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: when returning from sleep, start immediately

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 45f723cbbcd5709841dcf80a53b71b868981c32b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: we can't turn off cpu0

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 200fa3f03c2437316cd4e292637cb88e029c06cb)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: turn on cpu1 early

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit f136f08dbdd8af63b25ab2e0febd027e97b8e93b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: on resume pull up cpu1

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 92697e221eb6c7d90e13f08f81e76b3efeb96add)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: tweak hotplug values

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 41f90ac95b81e322bf815b9f9175f42076baf1fb)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mpdecision: don't use sleep, cancel/resume wq instead

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 4b6f8555481d2c5049eb7cb496283749ed7cd7ca)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mpdecision: checking every 100ms is enough

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 5b2ebff586b9dc1180ad4d972820e2bd03c67979)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mpdecision: update copyright

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit b2f1c3105d91dce4d465ae255c716a43c615a7d4)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Revert "mpdecision: don't use sleep, cancel/resume wq instead"

This reverts commit 4b6f8555481d2c5049eb7cb496283749ed7cd7ca.

(cherry picked from commit b0892ee984f92165761aa50498f67119374520b3)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add stats & expose to sysfs

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 5832aad71526842445e731e36cb4e5a6c58e8703)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix sleep, don't use pause

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit d93d84e62613c6620093eba51cd56027741c760d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix spacing across the whole file
In the past year this evolved to a battlefield of tabs, spaces and different sizes of them. Fix that.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 6469e3f8bec802556aa6859dee90bef9fe0e352f)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: stats: if cpu is online, add current ontime to stats

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 350854e97bb741a5e226109327fb2b5e52b14e30)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add input event boost [read more]

This adds an input event boost to mpdecision.
It will basically boost the min freq of all cpus to predefined values if an
input event is detected.
Devices that qualify as boosters must fullfill one of these conditions:
- contain touch in their name
- contain keyboard in their name
This also boosts cpus independently from each other. Meaning:
If a cpu is hotplugged after the boost of another cpu was initiated the next
boost pulse will boost that cpu too.

Sysfs interface underway.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 765c1cd2ec079737578b5b325d9a4842a37fe324)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add sysfs interface for input event boost

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 98e32278c55918586ba5766af8eccda4ed78c72c)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: input event boost: fix not resetting boost if cpu was unplugged before

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 694b5fa8186d9307a92a35338d653fabf53e2ee4)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: tune hotplug values

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 295c591b3f8cdb2f4491bca6930f8639f4cbe7a3)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: boost: detect changed min frequency and update accordingly

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 867d6c82e8c965af5377553915e1aa29ad724455)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: boost: don't schedule more check than needed

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit d8bfe5603a22fd8de3581419d8b1d364b5ec0382)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: increasing the check delay to 130ms
This change brings us down from 10 to 8 checks each second. The input boost reacts without
delay which is why we don't need to check for hotplugs so often anymore.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 77c031af148fcb9b165b7dc2e4ba66f9e440d234)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: change frequencies for input boost
This should provide us with a more battery friendly setup in light
usage situations while it still provides the obvious advantages
the input boost gives us (faster reaction).

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 0ccc71f9c2a83446c09a88b0ac2c61eb5970a834)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: min_cpus & max_cpus should on/offline affected cpus

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 6d8d3e0de32b115eaa4db63011381cbf7f84276d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: several changes [read more]
reworked cpu_up/down handling which removed redundant code
reworked max/min_cpus settings
reworked suspend/resume handling to obide by these new changes
also reworked locking for per cpu settings

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit cb8938c9c9f5a28ac8daf31d67cc0a3bf1a89096)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix changing boost freq sets min = boost freq

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 76fc80a3d7d4093f6b1aa42978e79198bbb002d0)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: boost: if we are not boosted, revib_wq does not need to run at all

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 9cbb323271a2432f594c08c50dacec16d1caf6c2)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add fb callback, keep earlysuspend

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit f52b61fe7745f202d00efb28b0e99c1de9cb21ec)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal/mpdec: export throttle indicator and don't input boost if we are throttled

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	drivers/thermal/bricked_thermal.c

(cherry picked from commit acbc051cd6c2eceba8ef3a97fc30a0f04d7768c5)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: switch to lcd callback and improve sus/res code

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 47b1e5b08c0b12b8b40d7ca823f06e1f7ddc04f4)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: remove per_cpu suspend value
This is unneccessary and produces overhead when checking/setting over loops

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit c3b856044aa4dfae10575a92a6bdaf755de8fa2e)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: offload definitions to header

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/mach-msm/msm_mpdecision.c

(cherry picked from commit 0696a7bfa4007d40f7cc1f37e9f506ad6ae659a1)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

thermal: when we restore the original limits use the norm_min freq from mpdecision inputboost

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 3770b42058f2eda793c6e818aa01325d18755e27)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix definitions for earlysuspend/lcd callback switch

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit ec354dbc6c31d1749d6c9a9f91f9b167ae8dfa85)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix whitespaces throughout the file to comply with linux coding styles

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/mach-msm/msm_mpdecision.h

(cherry picked from commit 4edf85bdee82e0df4bdb383c772fc134bcba610c)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: early continue get_slowest_cpu() and _rate() to save some cycles

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit e4124dd5750cee070f75a2bcec9ab0a49307b94a)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: move startdelay to init to save cycles on each work call

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit becac2df963c2d88b3f71076f633458d9ba210f8)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: also verify that boost frequencies are > minfreq

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit bcc1bd419628796e9a64691e2ac3fd021549ea9d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix boost_time not respecting sysfs changes
This fixes issue #17

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit a9dc895c63bcb4526d0296fea9fea096f7b0e00b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add missing #ifdefs around thermal related code
This fixes issue #19 (compilation without thermal)

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 4969c555a67840a43642868d0c669176c1c47fcc)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add input boost triggers
This fixes issue #27 - No boost event triggered
&
issue #28 - Power button should trigger boost_freq

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 5ce8125b831cbdd13b438c32e585d2917fdd5ddb)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: set idle_freq arch specific
This fixes issue #31 - idle frequency needs changing when switching archs

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit bea2cae43ff11ea7256d742205a8bf7b642c8882)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: fix early_suspend compilation

This was not changed because we do not compile with early suspend
and hence didn't encounter any errors. Fix it.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 6f3c7402ba9fccb1e881a17700e7bb5351e10b80)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: add locking to early_suspend related code, even if we do not use it

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 2527df2e26dd6253a2810ee69953365cf7357b2d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: opt out early if we are thermal throttled

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit f883bd75ad1a18a811ef5ca99c6e4444a3dc421d)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mdpec: fix missing ifdefs when compiling with earlysuspend

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 40ffd3a1949ca86dd58fb9b1076ff9873bd08ed1)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

msm_mpdecision: boost freqs are arch dependent too

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 3134e8f56301d689eec59c37c6673eb5ecf0687a)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

re enable msm rq stats

Signed-off-by: thirdzcee <thirdzcee@gmail.com>

tune the hotplugging for our dual core cpu

Signed-off-by: thirdzcee <thirdzcee@gmail.com>

make input boost a little less aggressive

Signed-off-by: thirdzcee <thirdzcee@gmail.com>

MPDECISION UPDATES

squached the following commits

mpdec: FIX BUG#27

Unplugging a boosted CPU will cause it to come back with
the boosted minimum frequency and stay on it.
(it gets stuck on boost)

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 58b252c3da1519435855830e80cf53cbb5d6355b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mpdec: if !scroff_single_core unboost all cpus while suspending

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 2b8e04bd0fb2f5783182fb7a1cc4fa7b8bbb79a0)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

mpdec: fix missing log message on resume if !scroff_single_core

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 7b7f8cc1f1c42f834f76c1452f839b8681052604)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

wow i was using my phone for 2 months with a broken thermal driver, luckily it didnt get fried, fixed it now,,, i missed something but now i added it... lesson learned "dont blindly cherry-pick commits"

Signed-off-by: thirdzcee <thirdzcee@gmail.com>
kbuild: drop cpuinit/cpuexit checks in modpost

With the removal of cpuinit/cpuexit we no longer need to
do section mismatch checks on these sections.

Drop it from modpost.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
(cherry picked from commit 67a2de689b96202705209556ea8a13b5bd0730f5)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
cpufreq: enable sibling cpu policy sharing

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

Signed-off-by: Paul Reioux <reioux@gmail.com>
(cherry picked from commit 3093530d423ce857aa6187916ea0b32da03003b9)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
drivers/cpufreq/cpufreq.c: re-enable cpu policy restore

original bug FINALLY fixed by:
  cpufreq: Save user policy min/max instead of policy min/max during hotplug

Signed-off-by: Paul Reioux <reioux@gmail.com>
(cherry picked from commit fa1860f8d61909a50aa0891c946cec754b5b42e5)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
Add badass governor

(cherry picked from commit d204155f76659575ca77e93f9357918fd9f06942)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/configs/bms_d2vzw_defconfig
	drivers/cpufreq/Kconfig
	drivers/cpufreq/Makefile
	include/linux/cpufreq.h
Add wheatley governor

(cherry picked from commit 6486d9a055922fe6493a78e8169af08a578aa42b)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/configs/bms_d2vzw_defconfig
Added dancedance governor
-Credit snuzzo

(cherry picked from commit fc3c134ae46124c06503a2aeef131b3b79b11abe)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/configs/bms_d2vzw_defconfig
Added smartass2 gov back into the mix

(cherry picked from commit b563d2aeb0fa4f785f09aad2fc9cb1ad517b601a)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/configs/bms_d2vzw_defconfig
Add smartmax cpu governor

(cherry picked from commit 2e55859bf85780280cd4cb97dbca9527e03459d2)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>

Conflicts:
	arch/arm/configs/bms_d2vzw_defconfig
Add ondemandplus governor
-credit boype

(cherry picked from commit 08dc771905fc94414b5d7165896fd3da3950c8f4)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
Add badass governor #2

(cherry picked from commit 7202f312d7f90eb33bb0f04bd2703b9113f0af22)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
Forgot to add cpufreq_smartass2.c to prev commit

(cherry picked from commit c03b8339e6bc7a1c7e9dd1f3a9f8f4539715ac62)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>
Fix smartass2 compile for 3.4.y

(cherry picked from commit b29956f3e49a4b545ef86d3b32de1da674e05de9)
Signed-off-by: thirdzcee <thirdzcee@gmail.com>