cpufreq: fix interactive bug during hotplug - original patch https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commit;h=940d4b98eab2577d6c1e710f2939a2b0b6b3f028

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "cpufreq: fix interactive bug during hotplug - original patch https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commit;h=940d4b98eab2577d6c1e710f2939a2b0b6b3f028"

This reverts commit f2c87ec04025a91071f17a7ae21e638bd1ef17be.
msm: acpuclock-8064/krait merges from codeaurora.org

msm: acpuclock-krait: NULL terminate L2 table for find_cur_l2_level()
find_cur_l2_level() assumes that the L2 table is NULL terminated
when it has never been terminated. Therefore, if the rate that is
read from the hardware during boot is not found in the table we
will run off the end of the table and read potential junk values.
NULL terminate all the L2 tables so that the loop in
find_cur_l2_level() is guaranteed to terminate.
Stephen Boyd <sboyd@codeaurora.org>

msm: acpuclock-krait: Keep the secondary MUX input fixed
With use of the QSB clock source recently eliminated, only one
input of the secondary clock MUX is used on any target. Since
there is overhead involved reprogramming this MUX when changing
the CPU and L2 frequencies, change the code to just program the
MUX at boot.  Most noticeably, this removes a 1us delay from
every CPU and L2 frequency switch.
Matt Wagantall <mattw@codeaurora.org>

msm: acpuclock-8064: Lower VDD_DIG voltage vote for L2 at 384MHz
New characterization data shows that vdd_dig voltage for L2@384MHz
can be lowered to 0.95v. Update the data in this patch.
Tianyi Gou <tgou@codeaurora.org>

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "msm: acpuclock-8064/krait merges from codeaurora.org"

This reverts commit da264ff47424af822f9190914e8692aacc8a5f7d.
mach-msm: mako: according to @morfic we can change the sensor id to 0 and stop thermald binary and the kernel will manage the heat by itself from its drivers. So lets test it.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: make some constants to be exported to userspace to let users customize them for their own usages.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: just hardcode the value for onlining all the cpus.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: allow arbitrary speed / target load mappings

Accept a string of target loads and speeds at which to apply the
target loads, per the documentation update in this patch.  For example,
"85 1000000:90 1700000:99" targets CPU load 85% below speed 1GHz,  90%
at or above 1GHz, until 1.7GHz and above, at which load 99% is targeted.

Attempt to avoid oscillations by evaluating the current speed
weighted by current load against each new choice of speed, choosing a
higher speed if the current load requires a higher speed.

Change-Id: Ie3300206047c84eca5a26b0b63ea512e5207550e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: remove load since last speed change

The longer-term load since last speed change isn't terribly useful,
may delay recognition of dropping load, and would need forthcoming
changes to adjust load for changing CPU speeds.  Drop it.

Change-Id: Ic3cbb0542cc3484617031787e03ed9bdd632dec1
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>