Revert "mako: EHCI: HSIC: Add support to vote for SVS digital voltage"

This reverts commit 186ee449f71271ca39d9e18418a4906e640c30f2.
Revert "EHCI: HSIC: Add support to vote for SVS digital voltage"

This reverts commit 2a845978bf99f02681f48495e58be443aea630df.
Revert "Voltage Control: initial voltage control for MSM S4-Pro SOC"

This reverts commit 24c2c51d59b308b1f4bbd129ba1bc77a38f9e89a.

Change-Id: I058e48075db0ae1dd23f97165858ecf5c3e61084
Revert "Voltage Control: add sysfs interface"

This reverts commit 1eb589c217f42c3705c9b7bdc188fdc386046441.
Mako (absolute) Voltage control.

This started out as just including the existing work of someone else.
But that was so obfuscated and needlessly moved in sysfs, i turned it into the type control
we have on NP, meaning same sysfs location and output formatting.
Since the various kernels range from no preUV to different levels of UV it is best to encourage the user
to think in absolute voltages.
"I can UV -150 on kernel X! Really? Odd, i can only UV kernel Y -50mV!"
Kernel X has no preUV, kernel Y has 100mV preUV, so they both run the same.
This is needlessly confusing to users.

Talking in absolutes, users will get a better understanding of "what the other guy's" device is capable of.
Sticking to a common sysfs location and to the common absolute voltage is thus the right thing to do.

This seems to work now as it should.

This is heavily based on coolbho3k's NP patch. from Paul's mess we might have a few function names, but not the contents.
This is not his, if he claims otherwise, he can go fuck himself.

Change-Id: If821e889457b3bfaa4f6b0cc4462003c5a8fba82
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
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.

Change-Id: Ia5d0213000b44def35e388fd3cadf0293344257b
Reported-by: Laura Abbot <lauraa@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
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.

Change-Id: I5cd8c981f1be49be7dbba1310d84df439e8be83b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
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.

Change-Id: Ibdb8568eca4d4ed602c5a5fee2f433a098dfbdcd
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
board: mako-regulator: decrease voltage requirements.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Undervolt: clean it up, make it elegant and remove the constrain of fixed set of NUM_FREQS - its not dynamic based on the number of freqs used for scaling via an external function.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Undervolt: few minor changes, mostly for clarity.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Undervolt: add checks to disallow too extreme voltages, min and max.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
USB force fast charging

-Use base from Chad Froebel <chadfroebel@gmail.com> so we continue to
use the same generic sysfs mechanism

-Referenced franco's git for drivers/usb/otg/msm_otg.c changes
https://github.com/franciscofranco/mako/commit/5a8a4c8e23c7e1df39c740b9ce1d5dda20b0ede3

Off by default

Turn on:
echo 1 > /sys/kernel/fast_charge/force_fast_charge

Turn off:
echo 0 > /sys/kernel/fast_charge/force_fast_charge
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Change-Id: Ie04ef0a524901bb5414aeba3fb1a000720896645