mfd: pm8xxx-misc: Make pm8xxx_preload_dVdd a no-op for PM8901 rev 2.3
Modify the pm8xxx_preload_dVdd function so that it does not
perform any PMIC register writes for PMIC PM8901 if the PMIC
revision is greater than or equal to 2.3.
dVdd preloading is not needed in order to reduce dVdd fluctuation
at startup beginning with PM8901 rev 2.3.
Change-Id: Idd7662db3cb494e6f3414fd8f1f8acfbf9bddfd1
Signed-off-by: David Collins <collinsd@codeaurora.org>
diff --git a/drivers/mfd/pm8xxx-misc.c b/drivers/mfd/pm8xxx-misc.c
index b655848..64c0bd1 100644
--- a/drivers/mfd/pm8xxx-misc.c
+++ b/drivers/mfd/pm8xxx-misc.c
@@ -999,6 +999,10 @@
{
int rc;
+ /* dVdd preloading is not needed for PMIC PM8901 rev 2.3 and beyond. */
+ if (pm8xxx_get_revision(chip->dev->parent) >= PM8XXX_REVISION_8901_2p3)
+ return 0;
+
rc = pm8xxx_writeb(chip->dev->parent, 0x0BD, 0x0F);
if (rc)
pr_err("pm8xxx_writeb failed for 0x0BD, rc=%d\n", rc);