development kernel tree: Changes to 'andy'
git at git.openmoko.org
git at git.openmoko.org
Tue Jul 22 13:10:51 CEST 2008
arch/arm/mach-s3c2440/mach-gta02.c | 32 ++++++++++++++---
drivers/i2c/chips/pcf50633.c | 2 +
drivers/power/bq27000_battery.c | 65 ++++++++++++++++++++++++-----------
include/linux/bq27000_battery.h | 2 +
4 files changed, 74 insertions(+), 27 deletions(-)
New commits:
commit be65c7c61ab4ee15a54c27b3d692cb4d088bfa41
Author: Andy Green <andy at openmoko.com>
Date: Tue Jul 22 12:10:15 2008 +0100
fix-bq27000-charger-state-tracking.patch
Charger trigger stuff goes and asks for POWER_SUPPLY_PROP_STATUS
to figure out what the charger state is. But until now, we only
reported there what we found out from HDQ, and the HDQ registers
are not updated very often in the coulomb counter, it can be 4
or more second lag before it tells us about what it experiences.
When we react to USB insertion and only after 500ms debounce tell
power_supply stuff that something changed, it most times will
see old pre-USB-insertion state from bq27000 over HDQ at that time
and will report it ain't charging, buggering up the LED trigger
tracking.
This patch maintains distance between bq27000 and pcf50633 by
having platform callbacks in bq27000 that it can use to ask about
definitive charger "online" presence and "activity", whether the
charger says it is charging. If these callbacks are implemented
(and we implement them in this patch up in mach_gta02.c) then
this information is used in preference to what is found from
HDQ.
Result is if you set the LED trigger like this:
echo bat-charging > /sys/devices/platform/gta02-led.0/leds/gta02-aux:red/trigger
then it lights up properly on USB insertion now, goes away on
removal properly, as as far as I saw, when charging stops too.
Signed-off-by: Andy Green <andy at openmoko.com>
commit 208f69ea86274db7ed39b4d4119ed77b76bfb839
Author: Andy Green <andy at openmoko.com>
Date: Tue Jul 22 12:10:15 2008 +0100
fix-pcf50633-move-charger-enable-decision-to-pcf50633_usb_curlim_set.patch
At the moment we ended up enabling and disabling the charger
at the time we service USBINS and USBREM events in the ISR.
We did that in machine specific code, but really it is PMU
specific decision, so this patch moves it into PMU code.
We enabled and disabled the charge immediately we saw the
interrupt event from PMU, yet we deferred setting charging
state based on ID and USB enumeration until at least after a
PMU ADC read that was handled in a second interrupt later.
Now the timing is unified to after we determined the charger
type and we enable and disable right there.
Signed-off-by: Andy Green <andy at openmoko.com>
More information about the commitlog
mailing list