diff options
author | Andrew Donnellan <andrew.donnellan@au1.ibm.com> | 2017-09-06 17:34:35 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-10-02 21:59:33 -0500 |
commit | 6c22ac75211b140e56f28825fb3518f5b07aa305 (patch) | |
tree | 6d4d0553724d7f34886405ed591f836080decb88 /include | |
parent | 47cb47a1c0dad85514773fd7686fb50e5ace3966 (diff) | |
download | skiboot-6c22ac75211b140e56f28825fb3518f5b07aa305.zip skiboot-6c22ac75211b140e56f28825fb3518f5b07aa305.tar.gz skiboot-6c22ac75211b140e56f28825fb3518f5b07aa305.tar.bz2 |
i2c: Move tpm i2c wrapper code into core
The TPM code has a wrapper around the main i2c API to allow synchronous use.
Move it into core/i2c.c so it can be used by other possible users. In
particular, a future patch will use this to drive OpenCAPI device resets
during boot time.
Cc: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>
Cc: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/i2c.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h index e5e8584..669c30a 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -106,6 +106,11 @@ static inline int i2c_check_quirk(struct i2c_request *req, int *rc) return 0; } +/* I2C synchronous request API */ +int i2c_request_send(int bus_id, int dev_addr, int read_write, + uint32_t offset, uint32_t offset_bytes, void* buf, + size_t buflen, int timeout); + /* P8 implementation details */ extern void p8_i2c_init(void); extern void p8_i2c_interrupt(uint32_t chip_id); |