diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-12-02 13:12:31 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-12-03 07:28:50 +0000 |
commit | 3b0a4055d17c17e4ee8df474858b40ffda518c31 (patch) | |
tree | 11f34c41666d8532ad012affea817402d6a75696 /board/spring | |
parent | a35f1b78417edab1150f1eb68b5d4dee7708dfc8 (diff) | |
download | chrome-ec-3b0a4055d17c17e4ee8df474858b40ffda518c31.tar.gz |
Move battery temp ranges to battery_info struct
This allows boards to detect the battery and return the correct temp
ranges, which will be needed for upcoming boards.
In the board-specific implementations, it's pretty much just moving
the fields from one const struct to another, so the impact is minor.
BUG=chrome-os-partner:24310
BRANCH=none
TEST=build all platforms; verify pit and rambi still charge
Change-Id: I7be075b3abb4039577f6362316adc1860c121d5c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/178424
Reviewed-by: Yung-chieh Lo <yjlou@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'board/spring')
-rw-r--r-- | board/spring/battery.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/board/spring/battery.c b/board/spring/battery.c index c5a9393b01..f8d88a84d2 100644 --- a/board/spring/battery.c +++ b/board/spring/battery.c @@ -15,7 +15,7 @@ #define PARAM_CUT_OFF_HIGH 0x00 /* Battery temperature ranges in degrees C */ -const struct battery_temperature_ranges bat_temp_ranges = { +static const struct battery_info info = { .start_charging_min_c = 5, .start_charging_max_c = 45, .charging_min_c = 5, @@ -24,6 +24,11 @@ const struct battery_temperature_ranges bat_temp_ranges = { .discharging_max_c = 100, }; +const struct battery_info *battery_get_info(void) +{ + return &info; +} + int battery_command_cut_off(struct host_cmd_handler_args *args) { int rv; |