power: pm8921-charger: vote D0 when running kickstart

There is a small window when the PMIC could lock up while
running the kickstart routine. If PMIC sleeps right while
kickstart is run, it causes a short sleep which is known
to cause PMIC locksup.

To prevent these, specifically vote for D0 clock while
running kickstart which guarantees that the PMIC will not
sleep.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>

Conflicts:
	drivers/power/pm8921-charger.c

Change-Id: I830749c19c79fd63238769ecf7472d03d67e7aa2
power: pm8921-bms: fix calibration and UVLO issues

The bms is not running a hkadc calibration before calculating the
first SOC. This causes accuracy issues with the power on SOC.

Also when the battery gets in the low voltage range, don't limit
the corrections. We have seen UVLO where even though the BMS was
calculating SOC quickly it was not lowering the SOC fast enough.
Skip limiting ocv change when battery is near cutoff voltage.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>

Conflicts:
	drivers/power/pm8921-bms.c

Change-Id: I746a9b003135d51d51c7d039d411689ca69571dc
power: pm8921-charger: Add delay after turning on D0 (TCXO) clock

On APQ8064, TCXO cannot be turned off before its warm-up period (4ms).
This is not required on the platform which have a CXO. Add a warm-up
delay after turning on D0 (which turns on the TCXO).

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/board-8064-pmic.c
	drivers/power/pm8921-charger.c
	include/linux/mfd/pm8xxx/pm8921-charger.h

Change-Id: Iaa91b8051d6d6ed7bd6394cc920411792b176224
power: pm8921-charger: Fix delay in USB wall-charger removal

Avoid scheduling time optimization for the vin_min work. This
prevents delay in USB removal detection for USB wall-charger.

CRs-Fixed: 579548
Change-Id: I578a0a70122e4d10ff932a41d6c6ac58e5ef121d
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>