From 41364f0fbe1e550a3326dd4310e41adec5ce30d7 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 27 Feb 2014 13:26:02 -0700 Subject: 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 Tested-by: Vadim Bendebury Signed-off-by: Vadim Bendebury Signed-off-by: Simon Glass --- include/cros_ec.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include/cros_ec.h') diff --git a/include/cros_ec.h b/include/cros_ec.h index 1e89f29..22eae90 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 -- cgit v1.1