power: qpnp-charger: Use the BUCK_CTRL_TRIM1 to adjust VDDMAX

When the battery is charging, the buck regulates a set voltage at the
battery terminals. This is set by the software in the charger
peripheral's VDDMAX register.

The charger's VDDMAX setting has a 20 millivolt resolution. This is
not enough, as being even 10mV over the max battery voltage can cause
the battery over voltage protection circuits to disconnect the
battery.

Use the buck's BUCK_CTRL_TRIM1 MSB's VDDMAX trim to adjust the VDDMAX
instead, providing a charging voltage resolution of 10mV, resolving
this issue.

Change-Id: I5e87b996d48286e69e58335ac18ef9ffda7c6fc0
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed