Revert "qseecom: Add case for releasing GENERIC  handle"

This reverts commit db77ffb2f0a6419fabc6af7acee651b40ef6c8bf.
Revert "qseecom: Add support to issue secure service cmd."

This reverts commit 34ee4325dcbe9c3fbbdaf713c47c0bcb2ebb7b2c.
CPUFREQ: Interactive: Removed boostpulse and applied a few patches
Update Linux Foundation header.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: rq_stats: Fix missing initalization of cur_freq

Initialize cur_freq variable of each online cpu to the current
running cpu clock frequency. This avoids zeroing out the load
calculations until the first notification of the change in CPU
frequency comes in after CPUFREQ governors are intialized.

Also when a non boot cpu is up, update its cur_freq variable.

Change-Id: I950686deff02e2339eefae7d09392dda2174a545
CRs-fixed: 446017
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm:rq_stats: Add hotplug disable attribute

Register for suspend and resume notifications from kernel. This should
be done as part of core_initcall so as to receive notification as close
as possible to the actual event. Add hotplug_disable attribute to
rq-stats node. Set/clear this attribute based on the suspend/resume events.

CRS-fixed: 452456
Change-Id: I76fee349b57f47df40785e9c2503e2e1cc6e064e
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Revert "Adding the rest of the files"

This reverts commit a4a7d70f2ce46dcd7e60be1699152a713de06b85.
Revert "Preparing for new mako_hotplug by francisco"

This reverts commit de6a9dc614ec6567896f507f90ebdfaf98019e97.
Add custom Mako Hotplug driver for onlining and offlining cores based on system load.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:
	arch/arm/kernel/Makefile
mako_hotplug: fix some bugs, increase load levels by 10% each, queue the works in a dedicated workqueue, reduce the number of divisions every work call, fix a possible memory leak.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
mako_hotplug: online cpu1 on screen on to remove the lag, also merge the cpu max freq cap from the video driver to this driver. A bunch of other small fixes as well.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:
	drivers/video/msm/mipi_lgit.c
mako_hotplug: use alloc_workqueue instead of create_*_workqueue because the latter is deprecated. Also online all cores on screen on for 1 sampling_rate for smoother screen on transitions.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
mako_hotplug: export settings to userspace. Also increase threshold for onlining all four cores to reduce heat at bordeline usages.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:
	drivers/misc/Makefile
mako_hotplug: add some flags to the WQ.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
mako_hotplug: reformat most of the code to be accoring upstream Kernel pedantic conventions.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
mako_hotplug: change load thresholds.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
mako_hotplug: fix a bug that was not updating online_cpus accordingly that then uncovered another bugs which led me to add a simple 10 position array for averaging the last 10 loads of the previous 10 samples which allows the driver to stay on quad-core during periods of continous high load. Also removed the sec_threshold temp_diff check for medium load if there is only 1 cpu online thus increasing interactivity between menus and UI interactions. Then after that initial onlining if the load keeps being medium it takes not 2 seconds but 4 seconds interval between onlining the remaining cpus.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
mako_hotplug: sync the threshold with the driver.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Fix various compilation errors