summaryrefslogtreecommitdiff
path: root/include/i2c.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-04-18 13:03:38 -0700
committerRandall Spangler <rspangler@chromium.org>2012-04-19 08:39:41 -0700
commit70f3fcaf8648230a5cd27a9da151494d6df3016f (patch)
treec67e9ff911914f7eaef7af6c9e95874cf8d0cce2 /include/i2c.h
parent6ecbb86b6392fa0b11514903a9fb3d3a3b704391 (diff)
downloadchrome-ec-70f3fcaf8648230a5cd27a9da151494d6df3016f.tar.gz
Add hooks module so modules can be notified of system-level events.
This will be used for sleep/wake/sysjump/etc. For now it's just wired up to clock frequency changing. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=manual: use nopll command, should still work Change-Id: Iedcea5830bc18eacfd955c29b8f793aba8905dd8
Diffstat (limited to 'include/i2c.h')
-rw-r--r--include/i2c.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/include/i2c.h b/include/i2c.h
index 22ab18adcf..7543d8cb25 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -13,30 +13,23 @@
/* Flags for slave address field, in addition to the 8-bit address */
#define I2C_FLAG_BIG_ENDIAN 0x100 /* 16 byte values are MSB-first */
-/* Initializes the module. */
+/* Initialize the module. */
int i2c_init(void);
-/* Notifies the module the system clock frequency has changed to <freq>. */
-void i2c_clock_changed(int freq);
-
-/* Reads a 16-bit register from the slave at 8-bit slave address
- * <slaveaddr>, at the specified 8-bit <offset> in the slave's address
- * space. */
+/* Read a 16-bit register from the slave at 8-bit slave address <slaveaddr>, at
+ * the specified 8-bit <offset> in the slave's address space. */
int i2c_read16(int port, int slave_addr, int offset, int* data);
-/* Writes a 16-bit register to the slave at 8-bit slave address
- * <slaveaddr>, at the specified 8-bit <offset> in the slave's address
- * space. */
+/* Write a 16-bit register to the slave at 8-bit slave address <slaveaddr>, at
+ * the specified 8-bit <offset> in the slave's address space. */
int i2c_write16(int port, int slave_addr, int offset, int data);
-/* Reads an 8-bit register from the slave at 8-bit slave address
- * <slaveaddr>, at the specified 8-bit <offset> in the slave's address
- * space. */
+/* Read an 8-bit register from the slave at 8-bit slave address <slaveaddr>, at
+ * the specified 8-bit <offset> in the slave's address space. */
int i2c_read8(int port, int slave_addr, int offset, int* data);
-/* Writes an 8-bit register to the slave at 8-bit slave address
- * <slaveaddr>, at the specified 8-bit <offset> in the slave's address
- * space. */
+/* Write an 8-bit register to the slave at 8-bit slave address <slaveaddr>, at
+ * the specified 8-bit <offset> in the slave's address space. */
int i2c_write8(int port, int slave_addr, int offset, int data);
/* Read ascii string using smbus read block protocol.