mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
soraka: Add battery information
BRANCH=none BUG=b:35585396 TEST=soraka EC boots and charges battery Change-Id: I06e0ce7cb143ee039fecada0b4e15a64bcf5968b Reviewed-on: https://chromium-review.googlesource.com/497530 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
d3b49deb80
commit
80d50a5919
@@ -17,6 +17,22 @@
|
||||
#define SB_SHIP_MODE_REG 0x3a
|
||||
#define SB_SHUTDOWN_DATA 0xC574
|
||||
|
||||
#ifdef BOARD_SORAKA
|
||||
static const struct battery_info info = {
|
||||
.voltage_max = 8800,
|
||||
.voltage_normal = 7700,
|
||||
.voltage_min = 6100,
|
||||
/* Pre-charge values. */
|
||||
.precharge_current = 256, /* mA */
|
||||
|
||||
.start_charging_min_c = 0,
|
||||
.start_charging_max_c = 45,
|
||||
.charging_min_c = 0,
|
||||
.charging_max_c = 45,
|
||||
.discharging_min_c = -10,
|
||||
.discharging_max_c = 60,
|
||||
};
|
||||
#elif defined(BOARD_POPPY)
|
||||
static const struct battery_info info = {
|
||||
.voltage_max = 13200,
|
||||
.voltage_normal = 11550,
|
||||
@@ -31,6 +47,9 @@ static const struct battery_info info = {
|
||||
.discharging_min_c = 0,
|
||||
.discharging_max_c = 60,
|
||||
};
|
||||
#else
|
||||
#error "Battery information not available for board"
|
||||
#endif
|
||||
|
||||
const struct battery_info *battery_get_info(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user