power: qpnp-charger: Introduce vddmax adjustments
power: qpnp-charger: Introduce vddmax adjustments

The charger peripheral's vdd regulation loop attempts to keep the
battery terminal voltage constant during the constant voltage
charging phase (CV charging). However, the analog regulation circuits
has a 30 millivolt accuracy rating. This can lead to over or under
charging of the battery.

Fix this by adjusting the vddmax based on VADC reads of the vbat_sns
line. Keep the vddmax within 5 millivolts of the set max voltage.

Change-Id: I072bdfc4a6b19f54effbf96e08524a2898eba76c
Signed-off-by: Xiaozhe Shi <4c58d9c21c42c2a4cf34b559441bd01b9c143cf4@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