mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 22:11:41 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
2225fbac6c
commit
07e4b2087f
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user