msm: acpuclock-krait: Support scaling CPU current requests

The current acpuclock-krait driver asserts a constant regulator
current request when a CPU is initialized or inserted, and
removes it when a CPU is hotplug-removed.

Improve on this by allowing the current requests to scale based
on the speed of the CPUs. This allows acpuclock drivers to
factor dynamic power into its current requests, which will
change based on the frequency.

Only msm8974 regulators support current requests, so the cur_ua
column is omitted from the other frequency tables. The 8974
table is populated with pessimistic placeholder currents for now,
until characterization data is available.

Change-Id: I1ef89406a0de0038d32039c361b755a5eedba847
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/acpuclock-krait.h b/arch/arm/mach-msm/acpuclock-krait.h
index 830a0f6..d4c3aa5 100644
--- a/arch/arm/mach-msm/acpuclock-krait.h
+++ b/arch/arm/mach-msm/acpuclock-krait.h
@@ -96,15 +96,15 @@
  * @reg: Regulator handle.
  * @rpm_reg: RPM Regulator handle.
  * @cur_vdd: Last-set voltage in uV.
- * @peak_ua: Maximum current draw expected in uA.
+ * @cur_ua: Last-set current in uA.
  */
 struct vreg {
 	const char *name;
 	const int max_vdd;
-	const int peak_ua;
 	struct regulator *reg;
 	struct rpm_regulator *rpm_reg;
 	int cur_vdd;
+	int cur_ua;
 };
 
 /**
@@ -143,12 +143,14 @@
  * @speed: CPU clock configuration.
  * @l2_level: L2 configuration to use.
  * @vdd_core: CPU core voltage in uV.
+ * @ua_core: CPU core current consumption in uA.
  */
 struct acpu_level {
 	const int use_for_scaling;
 	const struct core_speed speed;
 	const unsigned int l2_level;
 	int vdd_core;
+	int ua_core;
 };
 
 /**