summaryrefslogtreecommitdiff
path: root/include/battery.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-12-02 13:12:31 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-12-03 07:28:50 +0000
commit3b0a4055d17c17e4ee8df474858b40ffda518c31 (patch)
tree11f34c41666d8532ad012affea817402d6a75696 /include/battery.h
parenta35f1b78417edab1150f1eb68b5d4dee7708dfc8 (diff)
downloadchrome-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 'include/battery.h')
-rw-r--r--include/battery.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/include/battery.h b/include/battery.h
index 522f3aa80a..b10f8904c4 100644
--- a/include/battery.h
+++ b/include/battery.h
@@ -59,17 +59,6 @@ struct batt_params {
/* Battery couldn't tell us every params we want */
#define BATT_FLAG_BAD_ANY (1 << 4)
-/* Working temperature ranges in degrees C */
-struct battery_temperature_ranges {
- int8_t start_charging_min_c;
- int8_t start_charging_max_c;
- int8_t charging_min_c;
- int8_t charging_max_c;
- int8_t discharging_min_c;
- int8_t discharging_max_c;
-};
-extern const struct battery_temperature_ranges bat_temp_ranges;
-
/* Battery constants */
struct battery_info {
/* Design voltage in mV */
@@ -78,6 +67,13 @@ struct battery_info {
int voltage_min;
/* Pre-charge current in mA */
int precharge_current;
+ /* Working temperature ranges in degrees C */
+ int8_t start_charging_min_c;
+ int8_t start_charging_max_c;
+ int8_t charging_min_c;
+ int8_t charging_max_c;
+ int8_t discharging_min_c;
+ int8_t discharging_max_c;
};
/**