diff options
author | Scott <scollyer@chromium.org> | 2016-10-04 12:19:21 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-11 01:47:46 -0700 |
commit | 8c370fedba9e94eebe6c66db1e90033574081d2f (patch) | |
tree | 6fc29ae3bcdb3e579a18ed9ab2cb6f741b31c411 /include/i2c.h | |
parent | 220e13058223b5246fa75f01d420bda1ab8fb8d2 (diff) | |
download | chrome-ec-8c370fedba9e94eebe6c66db1e90033574081d2f.tar.gz |
g: Added I2CM driver to support chip_i2c_xfer()
Added i2cm driver to support chip_i2c-xfer function. The initial use
case is for INA chips on the Reef/Gru platforms. Note that this CL
does not include any board specific changes and therefore does not
include an I2C port definition or required pinmux settings.
BRANCH=none
BUG=chrome-os-partner:57059,chrome-os-partner:58355
TEST=manual
Used console command "i2cxfer r16 0 0x40 0" to read the config
register. Read 0x2771 [10097] which is the default value. In addition
wrote register 14 and read back the value.
Change-Id: If9e377da4c8f4835d4676281872a0f079fe56aa6
Signed-off-by: Scott <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/388794
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/i2c.h')
-rw-r--r-- | include/i2c.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h index ddb0508828..1514ce8f1a 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -318,4 +318,10 @@ int i2c_get_protocol_info(struct host_cmd_handler_args *args); void i2c_data_received(int port, uint8_t *buf, int len); int i2c_set_response(int port, uint8_t *buf, int len); +/** + * Initialize i2c master ports. This function can be called for cases where i2c + * ports are not initialized by default via a hook call. + */ +void i2cm_init(void); + #endif /* __CROS_EC_I2C_H */ |