aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/s3c2400.c
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:57 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:57 +0000
commit1a79e3eedd41508187b310ea71328af7522ce10f (patch)
treef2afed15f9aef3b75205b6ae8e5aa6fb6d40fd04 /drivers/serial/s3c2400.c
parent93a92d72b7b77c8238116316ef24dfb740beae91 (diff)
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@openmoko.com>
Diffstat (limited to 'drivers/serial/s3c2400.c')
0 files changed, 0 insertions, 0 deletions