msm: thermal: Enable hotplug support in kernel

Enable hotplug support in kernel after msm_thermal is disabled.
msm_thermal will register a call back function with tsens driver
for different sensors. When the threshold is reached, tsens will
generate an interrupt and notify hotplug_notify which will then
send out a complete object signal. Create do_hotplug kthread which
waits for the completion object signal, and check the new state
of hotplug mask to decide if cpu will be hotplugged. When hotplug
is done, call sysfs_notify to update cpus_offlined mask.
store_cpus_offlined and store_cc_enabled will also send complete
object siganl to do_hotplug kthread to update cpus_offlined mask.
Whenever user write into cpus_offlined mask through sysfs node,
the vote will be there until user remove the mask. show_cpus_offlined
will return the OR results of KTM and user space vote.

The sensor mapping is provided in device tree.

Retain the core control part of the kernel module that polls the
temperature to decide to offline cores.

CRs-Fixed: 515110
Change-Id: I7f644088ef4d2683c5bf960df10723a628789aa5
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>
3 files changed