diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2016-06-01 17:55:16 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-08 19:17:56 -0700 |
commit | 07e4b2087fd6d15a6e0697d18b07f37731d09bb1 (patch) | |
tree | f7d0eeb4e8635cfb9176c1ad9ddb8d042b5abc83 | |
parent | 2225fbac6c818752309b1627093ca9d7ca1ac00f (diff) | |
download | chrome-ec-07e4b2087fd6d15a6e0697d18b07f37731d09bb1.tar.gz |
reef: Minimum battery voltage settings in no battery condition
In no battery condition set the battery minimum voltage to the
battery maximum voltage so that the charger voltage is set to the
battery maximum voltage. This adds more reliability for the system
and also avoids system reboot due to voltage drop on VBATA.
BUG=chrome-os-partner:53968
BRANCH=none
TEST=If battery is not present, EC console command 'charger'
gives battery maximum value.
Change-Id: I1f7740977cbe7087c27de95036a0eb5c385c0a54
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/348942
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | board/reef/battery.c | 10 | ||||
-rw-r--r-- | board/reef/board.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/board/reef/battery.c b/board/reef/battery.c index 2b86f7f012..5f29aa0628 100644 --- a/board/reef/battery.c +++ b/board/reef/battery.c @@ -34,7 +34,15 @@ static const struct battery_info info = { const struct battery_info *battery_get_info(void) { - return &info; + static struct battery_info batt_info; + + if (battery_is_present() == BP_YES) + return &info; + + /* Use voltage_max for voltage min if battery is not present */ + batt_info = info; + batt_info.voltage_min = batt_info.voltage_max; + return &batt_info; } int board_cut_off_battery(void) diff --git a/board/reef/board.h b/board/reef/board.h index 837bd292dd..b02a28d4f5 100644 --- a/board/reef/board.h +++ b/board/reef/board.h @@ -29,6 +29,7 @@ #define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 1 #define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 15000 #define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 1 +#define CONFIG_CHARGER_NARROW_VDC #define CONFIG_USB_CHARGER /* USB PD config */ |