diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-19 14:06:08 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-19 14:06:08 +0000 |
commit | 54f08f3ab129918e68792a508ae46e086764749b (patch) | |
tree | 67d73bde0c61ec7581f920c53db353f158108122 /firmware/target/arm/powermgmt-ascodec.c | |
parent | dd8e8a7d05443ed730760f196a9deebd559d661d (diff) | |
download | rockbox-54f08f3ab129918e68792a508ae46e086764749b.tar.gz rockbox-54f08f3ab129918e68792a508ae46e086764749b.zip |
as3525v2: fix end of charge detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26163 a1c6a512-1295-4272-9138-f99709370657
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 | } |