summaryrefslogtreecommitdiff
path: root/chip/npcx/i2c_chip.h
diff options
context:
space:
mode:
Diffstat (limited to 'chip/npcx/i2c_chip.h')
-rw-r--r--chip/npcx/i2c_chip.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/chip/npcx/i2c_chip.h b/chip/npcx/i2c_chip.h
new file mode 100644
index 0000000000..014e6cddf2
--- /dev/null
+++ b/chip/npcx/i2c_chip.h
@@ -0,0 +1,28 @@
+/* Copyright 2017 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* NPCX-specific I2C module for Chrome EC */
+
+#ifndef __CROS_EC_I2C_CHIP_H
+#define __CROS_EC_I2C_CHIP_H
+
+/**
+ * Select specific i2c port connected to i2c controller.
+ *
+ * @parm port I2C port
+ */
+void i2c_select_port(int port);
+
+/*
+ * Due to we couldn't support GPIO reading when IO is selected I2C, we need
+ * to distingulish which mode we used currently.
+ *
+ * @parm port I2C port
+ *
+ * @return 0: i2c ports are selected to pins. 1: GPIOs are selected to pins.
+ */
+int i2c_is_raw_mode(int port);
+
+#endif /* __CROS_EC_I2C_CHIP_H */