aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Bendebury2014-02-27 13:26:02 -0700
committerSimon Glass2014-03-17 20:05:46 -0600
commit41364f0fbe1e550a3326dd4310e41adec5ce30d7 (patch)
treeb9a35451b58a83eef5cdbc196ebb9bd03a854112 /include
parent006e73b9cafde9287912c4699091f3b1f07d3f97 (diff)
cros_ec: Move EC interface into common library
Add a common library for obtaining access to the Chrome OS EC. This is used by boards which need to talk to the EC. Reviewed-by: Vadim Bendebury <vbendeb@google.com> Tested-by: Vadim Bendebury <vbendeb@google.com> Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/cros_ec.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/cros_ec.h b/include/cros_ec.h
index 1e89f29eea6..22eae906050 100644
--- a/include/cros_ec.h
+++ b/include/cros_ec.h
@@ -431,4 +431,22 @@ int cros_ec_set_ldo(struct cros_ec_dev *dev, uint8_t index, uint8_t state);
* @return 0 if ok, -1 on error
*/
int cros_ec_get_ldo(struct cros_ec_dev *dev, uint8_t index, uint8_t *state);
+
+/**
+ * Initialize the Chrome OS EC at board initialization time.
+ *
+ * @return 0 if ok, -ve on error
+ */
+int cros_ec_board_init(void);
+
+/**
+ * Get access to the error reported when cros_ec_board_init() was called
+ *
+ * This permits delayed reporting of the EC error if it failed during
+ * early init.
+ *
+ * @return error (0 if there was no error, -ve if there was an error)
+ */
+int cros_ec_get_error(void);
+
#endif