msm: krait-regulator: disable mdd when a cpu is offlined
msm: krait-regulator: disable mdd when a cpu is offlined

Currently the driver leaves MDD on while a CPU is hotplugged out if
it were operating in LDO mode. Leaving the MDD on while the cpu is
off wastes around 300uA of current.

Fix this by making sure that MDD is turned off while a cpu is hotplugged
out. Note that it is guaranteed that the cpu wont be in retention (which
needs MDD to be on) while hotplugged out, so it is safe to turn off MDD
when a cpu is offline.

While at it, there is another issue where the MDD was not being turned
off while exiting from retention mode. This happens when the CPU was
operating in BHS mode. Fix this.

Change-Id: Ib88ccdda41391bf6edb759be090e5108b062a661
Signed-off-by: Abhijeet Dharmapurikar <98996d53ce579fa37f08d0061abc5355e223c79e@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