summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-19 14:06:08 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-19 14:06:08 +0000
commit54f08f3ab129918e68792a508ae46e086764749b (patch)
tree67d73bde0c61ec7581f920c53db353f158108122 /firmware
parentdd8e8a7d05443ed730760f196a9deebd559d661d (diff)
downloadrockbox-54f08f3ab129918e68792a508ae46e086764749b.tar.gz
rockbox-54f08f3ab129918e68792a508ae46e086764749b.tar.bz2
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')
-rw-r--r--firmware/target/arm/powermgmt-ascodec.c9
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)
sleep(HZ/10); /* Allow charger turn-on time (it could be gradual). */
+#if CONFIG_CPU != AS3525v2
/* acknowledge first end of charging interrupt, it seems to happen both
- * at charger plug and charger unplug */
+ * at charger plug and charger unplug
+ * It doesn't happen on newer AS3543
+ */
ascodec_endofch();
+#endif
charge_state = CHARGING;
charger_total_timer = CHARGER_TOTAL_TIMER;
@@ -122,6 +126,9 @@ static void enable_charger(void)
void powermgmt_init_target(void)
{
/* Everything CHARGER, OFF! */
+#if CONFIG_CPU == AS3525v2
+ ascodec_write_pmu(AS3543_CHARGER, 2, 0x01); //EOC current theshold 30%
+#endif
ascodec_monitor_endofch();
ascodec_write_charger(TMPSUP_OFF | CHG_I_50MA | CHG_V_3_90V | CHG_OFF);
}