summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/power/axp221.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index 1fda19ac01..728727b48e 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -304,9 +304,14 @@ int axp221_set_aldo3(unsigned int mvolt)
int axp221_init(void)
{
+ /* This cannot be 0 because it is used in SPL before BSS is ready */
+ static int needs_init = 1;
u8 axp_chip_id;
int ret;
+ if (!needs_init)
+ return 0;
+
ret = pmic_bus_init();
if (ret)
return ret;
@@ -318,6 +323,7 @@ int axp221_init(void)
if (!(axp_chip_id == 0x6 || axp_chip_id == 0x7 || axp_chip_id == 0x17))
return -ENODEV;
+ needs_init = 0;
return 0;
}