cpufreq: Create a helper function to get CPU utilization Use the new cpufreq_quick_get_util function in alessa_hotplug driver

Change-Id: I0028ab4b0090e25ba6836ab2ae13c8623d329934
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
 cpufreq: add generic get_cpuidle_time

Easier to maintain this in one place.

Change-Id: Iea688cb81e2fff0c1724405c00ccac65425ebadb
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Add option of MSM RQ Stats for the Alessa plug [HIGHLY NECESSARY]

This Enable collection and exporting of MSM Run Queue stats to userspace
And updated gobernors to use it :)

Change-Id: I0efe30ad36fbd0aad72afb817896e1251535f832
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
workqueue: Add mod_delayed_work()
mod_delayed_work() updates a timer if the work is pending otherwise calls
queue_delayed_work_on() to queue the work with the specified delay.

Call cancel_delayed_work_sync() and then queue_delayed_work() again to
change a timer's delays is too expensive (and requires process context).
Istead we call mod_delayed_work() to only modify the timer's timeout.

LKML-Reference: <20110203161906.GG2570@htj.dyndns.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

Change-Id: I72d07ad4402ab399eb2055d7f93c920c845b1b65
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
workqueue: make deferrable delayed_work initializer names consistent

Change-Id: Id89427416cab477312971d4a32198b84c02e5ed7
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
workqueue: reorganize try_to_grab_pending() and __cancel_timer_work()
* Move timer handling from __cancel_work_timer() to
  try_to_grab_pending().

* Make try_to_grab_pending() use -EAGAIN instead of -1 for
  busy-looping and drop the ret local variable.

* Add proper function comment to try_to_grab_pending().

This makes the code a bit easier to understand and will ease further
changes.  This patch doesn't make any functional change.

Change-Id: I3cc21ac2339937db5171a644cbe0164ba2df711c
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
workqueue: implement mod_delayed_work[_on]()
Workqueue was lacking a mechanism to modify the timeout of an already
pending delayed_work.  delayed_work users have been working around
this using several methods - using an explicit timer + work item,
messing directly with delayed_work->timer, and canceling before
re-queueing, all of which are error-prone and/or ugly.

This patch implements mod_delayed_work[_on]() which behaves similarly
to mod_timer() - if the delayed_work is idle, it's queued with the
given delay; otherwise, its timeout is modified to the new value.
Zero @delay guarantees immediate execution.

Change-Id: I0e472f1d94b03da6deb4f20c95062ae9e1c8e0e9
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>