summaryrefslogtreecommitdiff
path: root/include/battery.h
diff options
context:
space:
mode:
authorMichael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com>2022-04-13 13:25:54 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-14 10:31:39 +0000
commit4efe01202e6c8e5681c953732ebf3ada539c8804 (patch)
tree6881f036b4c5bf9d840b78beb9e74a9630d7ab8b /include/battery.h
parentd1c5c1c0d5b74bb011a9f76d3a89d90ea3373275 (diff)
downloadchrome-ec-4efe01202e6c8e5681c953732ebf3ada539c8804.tar.gz
virtual_battery: Return manufacturer data
Add battery command manufacturer data BUG=b:228360450 BRANCH=kukui TEST=make buildall Run command "ectool i2cxfer 2 0x0b 0x05 0x23" on damu Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Iab93801e28b0d6f32cb257c19573e6dfbdc3c3bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3583910 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'include/battery.h')
-rw-r--r--include/battery.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/battery.h b/include/battery.h
index 27e678c0ba..2bf6e7bb06 100644
--- a/include/battery.h
+++ b/include/battery.h
@@ -395,6 +395,15 @@ int battery_device_chemistry(char *dest, int size);
int battery_manufacturer_date(int *year, int *month, int *day);
/**
+ * Read battery manufacturer data.
+ *
+ * @param dest Destination buffer.
+ * @param size Length of destination buffer.
+ * @return non-zero if error.
+ */
+int battery_manufacturer_data(char *data, int size);
+
+/**
* Report the absolute difference between the highest and lowest cell voltage in
* the battery pack, in millivolts. On error or unimplemented, returns '0'.
*/