msm: spm-regulator: Switch to PWM mode before increasing voltage
msm: spm-regulator: Switch to PWM mode before increasing voltage

Change the voltage setting function so that if the PMIC regulator
starts out in AUTO mode, it is switched to PWM mode before
increasing the voltage set point of the regulator.  This ensures
that the output voltage steps up to the new set point as quickly
as possible.  If the regulator began in AUTO mode, then change
the mode back to AUTO after the final voltage has been reached so
that power consumption is minimized.

Read the voltage stepping control register during probe so that
an accurate step rate can be calculated.

It has been found that voltage transitions take a very long time
to complete if the regulator is configured for AUTO mode.  This
can result in crashes due to temporarily undervolting the APSS
cores.

Change-Id: If2d54bbff6a2d4789b8eb727c767053303976778
Signed-off-by: David Collins <0dc5b64a0a004c3a10b37a64ec99148749baaf8b@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas