summaryrefslogtreecommitdiff
path: root/include/battery.h
diff options
context:
space:
mode:
authorDave Parker <dparker@chromium.org>2014-04-19 14:04:03 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-04-30 03:21:55 +0000
commitf64887bda0289905c81bcb2050b5741c718795da (patch)
tree7d6a5817a9b93dab2a92c01fcce821eb3c2ff9d7 /include/battery.h
parentdc6a36d371056d2af6026e63b1ebfd9e4950b10a (diff)
downloadchrome-ec-f64887bda0289905c81bcb2050b5741c718795da.tar.gz
Also adds 'battparam' console command. BUG=chrome-os-partner:25145 BRANCH=ToT TEST=Run 'ectool batteryparam set 0 0x1234' 'ectool batteryparam get 0' and on the console: 'battparam 0' 'battparam 0 0x1234' on a board that implements parameter 0. Change-Id: I9cc54d001631f53dd39ae64cfdeececaa1747181 Original-Change-Id: Ib2812f57f2484309d613b23dab12ad43e0417bd2 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/195824 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/197162 (cherry picked from commit 4e1472e3037602beec0eb5849ab76fb055d5a657) Reviewed-on: https://chromium-review.googlesource.com/197590 Commit-Queue: Bernie Thompson <bhthompson@chromium.org> Tested-by: Bernie Thompson <bhthompson@chromium.org>
Diffstat (limited to 'include/battery.h')
-rw-r--r--include/battery.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/battery.h b/include/battery.h
index 61c9dee20f..9743a451e5 100644
--- a/include/battery.h
+++ b/include/battery.h
@@ -268,4 +268,26 @@ int battery_device_chemistry(char *dest, int size);
*/
int battery_manufacturer_date(int *year, int *month, int *day);
+/**
+ * Read battery vendor parameter.
+ *
+ * Vendor parameter handlers are implemented in a board-specific battery.c
+ *
+ * @param param Parameter identifier.
+ * @param value Location to store retrieved value.
+ * @return non-zero if error.
+ */
+int battery_get_vendor_param(uint32_t param, uint32_t *value);
+
+/**
+ * Write battery vendor parameter.
+ *
+ * Vendor parameter handlers are implemented in a board-specific battery.c
+ *
+ * @param param Parameter identifier.
+ * @param value Value to write to the battery.
+ * @return non-zero if error.
+ */
+int battery_set_vendor_param(uint32_t param, uint32_t value);
+
#endif /* __CROS_EC_BATTERY_H */