summaryrefslogtreecommitdiff
path: root/include/cros_ec.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-02-27 13:26:14 -0700
committerSimon Glass <sjg@chromium.org>2014-03-17 20:05:48 -0600
commitb2a668b523ee78c56b466300350050924ed59553 (patch)
tree6c330255f2ed40cb385de7f0ba2ed0d0541e962e /include/cros_ec.h
parent86bf601d0414541d210d31fe44d44c85c5d0fee0 (diff)
downloadu-boot-imx-b2a668b523ee78c56b466300350050924ed59553.zip
u-boot-imx-b2a668b523ee78c56b466300350050924ed59553.tar.gz
u-boot-imx-b2a668b523ee78c56b466300350050924ed59553.tar.bz2
cros_ec: Implement I2C pass-through
The Chrome EC has a feature where you can access its I2C buses through a pass-through arrangement. Add a command to support this, and export the function for it also. Reviewed-by: Vadim Bendebury <vbendeb@google.com> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/cros_ec.h')
-rw-r--r--include/cros_ec.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/cros_ec.h b/include/cros_ec.h
index 1b7c620..1e4d8db 100644
--- a/include/cros_ec.h
+++ b/include/cros_ec.h
@@ -501,4 +501,18 @@ int cros_ec_decode_ec_flash(const void *blob, struct fdt_cros_ec *config);
*/
void cros_ec_check_keyboard(struct cros_ec_dev *dev);
+/*
+ * Tunnel an I2C transfer to the EC
+ *
+ * @param dev CROS-EC device
+ * @param chip Chip address (7-bit I2C address)
+ * @param addr Register address to read/write
+ * @param alen Length of register address in bytes
+ * @param buffer Buffer containing data to read/write
+ * @param len Length of buffer
+ * @param is_read 1 if this is a read, 0 if this is a write
+ */
+int cros_ec_i2c_xfer(struct cros_ec_dev *dev, uchar chip, uint addr,
+ int alen, uchar *buffer, int len, int is_read);
+
#endif