diff options
Diffstat (limited to 'firmware/target/arm/powermgmt-ascodec.c')
-rw-r--r-- | firmware/target/arm/powermgmt-ascodec.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/target/arm/powermgmt-ascodec.c b/firmware/target/arm/powermgmt-ascodec.c index e50367fe93..c8bd1cd51f 100644 --- a/firmware/target/arm/powermgmt-ascodec.c +++ b/firmware/target/arm/powermgmt-ascodec.c | |||
@@ -110,9 +110,13 @@ static void enable_charger(void) | |||
110 | 110 | ||
111 | sleep(HZ/10); /* Allow charger turn-on time (it could be gradual). */ | 111 | sleep(HZ/10); /* Allow charger turn-on time (it could be gradual). */ |
112 | 112 | ||
113 | #if CONFIG_CPU != AS3525v2 | ||
113 | /* acknowledge first end of charging interrupt, it seems to happen both | 114 | /* acknowledge first end of charging interrupt, it seems to happen both |
114 | * at charger plug and charger unplug */ | 115 | * at charger plug and charger unplug |
116 | * It doesn't happen on newer AS3543 | ||
117 | */ | ||
115 | ascodec_endofch(); | 118 | ascodec_endofch(); |
119 | #endif | ||
116 | 120 | ||
117 | charge_state = CHARGING; | 121 | charge_state = CHARGING; |
118 | charger_total_timer = CHARGER_TOTAL_TIMER; | 122 | charger_total_timer = CHARGER_TOTAL_TIMER; |
@@ -122,6 +126,9 @@ static void enable_charger(void) | |||
122 | void powermgmt_init_target(void) | 126 | void powermgmt_init_target(void) |
123 | { | 127 | { |
124 | /* Everything CHARGER, OFF! */ | 128 | /* Everything CHARGER, OFF! */ |
129 | #if CONFIG_CPU == AS3525v2 | ||
130 | ascodec_write_pmu(AS3543_CHARGER, 2, 0x01); //EOC current theshold 30% | ||
131 | #endif | ||
125 | ascodec_monitor_endofch(); | 132 | ascodec_monitor_endofch(); |
126 | ascodec_write_charger(TMPSUP_OFF | CHG_I_50MA | CHG_V_3_90V | CHG_OFF); | 133 | ascodec_write_charger(TMPSUP_OFF | CHG_I_50MA | CHG_V_3_90V | CHG_OFF); |
127 | } | 134 | } |