summaryrefslogtreecommitdiff
path: root/include/i2c.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-10-26 16:11:45 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-12-01 19:59:01 -0800
commit5602f4d5155a6ea0eefbd514871c069b381dbd0a (patch)
tree79b405e4bdbe28e4484595f1f7795f1716c4db8f /include/i2c.h
parent2c1626eb45e317d4b705add89409f294a7146919 (diff)
downloadchrome-ec-5602f4d5155a6ea0eefbd514871c069b381dbd0a.tar.gz
i2c: Lock out i2c passthru except for desired ports
Lock out all non-essential i2c passthru ports when system is protected. BUG=chrome-os-partner:58859 BRANCH=gru TEST='ectool i2cxfer 0 0 0 0' on locked system, verify that "ACCESS DENIED" is returned. Change-Id: If4119bbb319aa491d0e79a9ed80c94daa7950c2f Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/403543 Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> (cherry picked from commit d29fdb5484b994937c6586a50dd2818028f15f3f) Reviewed-on: https://chromium-review.googlesource.com/415493 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/i2c.h')
-rw-r--r--include/i2c.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h
index 38e632e38e..73716cf705 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -324,4 +324,13 @@ int i2c_set_response(int port, uint8_t *buf, int len);
*/
void i2cm_init(void);
+/**
+ * Board-level function to determine whether i2c passthru should be allowed
+ * on a given port.
+ *
+ * @parm port I2C port
+ *
+ * @return true, if passthru should be allowed on the port.
+ */
+int board_allow_i2c_passthru(int port);
#endif /* __CROS_EC_I2C_H */