as3514/as3543 fixes
commitea7d47eb227247aa7604932772c7fa8c28ef590a
authorfunman <funman@a1c6a512-1295-4272-9138-f99709370657>
Mon, 17 May 2010 20:53:25 +0000 (17 20:53 +0000)
committerfunman <funman@a1c6a512-1295-4272-9138-f99709370657>
Mon, 17 May 2010 20:53:25 +0000 (17 20:53 +0000)
tree29cf685626bf8c01bb64ed9456850f62e4a57d7d
parentef434259481e18c24974b0141b509044b137bff7
as3514/as3543 fixes

- Enable end of charge monitoring once, it doesn't need to be disabled
- Acknowledge the first (wrong) end of charge interrupt on charger enable
  (this had been broken in r25299)
- Centralize reads to ENRD* registers and cache the results when needed
    - on PP it is not needed because reads are atomic, we only check for
      end of charge when the charging, and for charger presence when
      discharging

as3525v2 (using as3543) specifics
- I got the datasheet today from AMS, thanks to them for being so fast
  and not require me to sign tons of papers!
- USB detection now works on as3525v2 using the as3543. Clip+ won't
  reboot to OF yet, it needs mkamsboot support first (usbstack disabled)
- Charging should work, the CHARGER register is at a different place, it
  is an extended PMU register -> use ascodec_read/write_charger() to
  access it
- real interrupts are not used yet for ENRD, we get thousands of
  interrupts per second, apparently only limited by the i2c clock.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26116 a1c6a512-1295-4272-9138-f99709370657
apps/debug_menu.c
firmware/export/as3514.h
firmware/export/config/sansaclipplus.h
firmware/target/arm/as3525/ascodec-as3525.c
firmware/target/arm/as3525/ascodec-target.h
firmware/target/arm/as3525/power-as3525.c
firmware/target/arm/as3525/usb-as3525.c
firmware/target/arm/as3525/usb-target.h
firmware/target/arm/ascodec-target.h
firmware/target/arm/powermgmt-ascodec.c