From 62df62ccd4551ad2133d513be583839d229a9365 Mon Sep 17 00:00:00 2001 From: Rong Chang Date: Wed, 8 Feb 2012 18:40:15 -0800 Subject: Add basic smart battery driver This change adds a common part of smart battery driver. Following features are not implemented, or in chip specific driver: Battery access control, authentication, factory mode Manufacturer access/data commands Block read/write, device name, flash data Chip specific features, per cell info/temp/capacity Signed-off-by: Rong Chang BUG=chrome-os-partner:7856 TEST=console command check battery staus [unplug power] > battery [check voltage,current,capacity,time to empty] [plug power] > charger voltage 8400 > charger current 4250 > battery [check current,time to full] > charger input 4032 > battery [check current,time to full] [wait 130 seconds, charger watch dog timeout] > battery [check current] Change-Id: Ifac17a0892f52e8f37eebc14b00e71f18360776c Signed-off-by: Rong Chang --- include/charger.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/charger.h') diff --git a/include/charger.h b/include/charger.h index 19184c5389..65ba8c1b48 100644 --- a/include/charger.h +++ b/include/charger.h @@ -27,10 +27,12 @@ struct charger_info { uint16_t input_current_step; }; -/* Initializes the charger, with AC input on and battery - * charging off. */ +/* Initializes the charger */ int charger_init(void); +/* Power state machine post init */ +int charger_post_init(void); + /* Get charger information. */ const struct charger_info *charger_get_info(void); -- cgit v1.2.1