cros_ec: Allow reading the battery-charge state

Add a function to read this information from the EC. It is useful for
determining whether the battery has enough charge to boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/cros_ec.h b/include/cros_ec.h
index 9396b4d..9dab6cd 100644
--- a/include/cros_ec.h
+++ b/include/cros_ec.h
@@ -652,4 +652,12 @@
 int cros_ec_vstore_write(struct udevice *dev, int slot, const uint8_t *data,
 			 size_t size);
 
+/**
+ * cros_ec_read_batt_charge() - Read the battery-charge state
+ *
+ * @dev: CROS-EC device
+ * @chargep: Return battery-charge state as a percentage
+ */
+int cros_ec_read_batt_charge(struct udevice *dev, uint *chargep);
+
 #endif