summaryrefslogtreecommitdiff
path: root/include/battery.h
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-11-05 07:00:17 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-11-05 22:45:21 +0000
commitd64de2bb1b903214ce19951918910a9f9ff10abf (patch)
tree6086702c7cac39ca78e04888703ead871be8e5ca /include/battery.h
parent48dfd8c5ee5679c13b3931cac843b4e3dc1f9ed4 (diff)
downloadchrome-ec-d64de2bb1b903214ce19951918910a9f9ff10abf.tar.gz
Show smart battery status with 'battery' command
The smart battery status register holds some useful info. This displays it along with all the other stuff. This decodes the alarm and status bits, but not the error code, since that field is only valid immediately after a failed i2c transaction (that's how the battery indicates error). Since we do all sorts of automatic battery probing in other threads, that value will never be reliable when we run the "battery" console command. BUG=none BRANCH=none TEST=manual Run "battery". You should see a new line amongst the output: Status: 0x00c0 DCHG INIT Change-Id: I5e684198af2cf7767f89786c91a7d946ad95d4c2 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/175659
Diffstat (limited to 'include/battery.h')
-rw-r--r--include/battery.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/battery.h b/include/battery.h
index 10d0b6dcd0..b5056cf9d4 100644
--- a/include/battery.h
+++ b/include/battery.h
@@ -86,7 +86,7 @@ int battery_is_connected(void);
/**
* Get battery mode.
*
- * See MODE_* constants in smart_battery.h
+ * See MODE_* constants in battery_smart.h
*
* @param mode Destination for current mode.
* @return non-zero if error.
@@ -96,7 +96,7 @@ int battery_get_mode(int *mode);
/**
* Set battery mode.
*
- * See MODE_* constants in smart_battery.h
+ * See MODE_* constants in battery_smart.h
*
* @param mode New mode.
* @return non-zero if error.
@@ -267,7 +267,7 @@ int battery_charging_allowed(int *allowed);
/**
* Read battery status.
*
- * @param status Destination for status; see STATUS_* in smart_battery.h.
+ * @param status Destination for status; see STATUS_* in battery_smart.h.
* @return non-zero if error.
*/
int battery_status(int *status);