PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs

The current devfreq_update_status() has the following bugs:
- When the new frequency doesn't have a valid level, the time spent in the
  new frequency is counted towards the next valid frequency switch instead
  of being ignored.
- The time spent on the previous frequency is added to the new frequency's
  stats instead of the previous frequency's stats.

This patch fixes all of this.

Change-Id: I7bbdafca78d1565cdbf815356556fe6d6cca9e3f
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
PM / devfreq: Check for GPU busy time before sending the sample

Sometimes GPU busy time is very low during sampling. Accumulate
the statistics and send them with the next sample.

Change-Id: I77e568b48afc3a4922c7c341d9478705b7ae3a30
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
PM: devfreq: Define tunables with a static scope

Change-Id: Iff9b50f4c226fb8e3fe90e65116170e768f44284
PM: devfreq: Fix derpage

Forgot to git add. Note to self: Don't push when you're
fucking pissed about fucking useless discussions.

Change-Id: Idf73e501151e4077873993f57d8a8d9084edce0d
PM: devfreq: Add sysfs nodes for devfreq governors

Conflicts:
	drivers/devfreq/governor_simpleondemand.c

Change-Id: I861a53342e341322059f5da5e0696aee7bdf61eb
msm: Use proper return values in store*() functions

Conflicts:
	arch/arm/mach-msm/clock-krait-8974.c

Change-Id: I4e1a27a003ff2d8f96c1f14e0d53a28f9f25943b