diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2006-12-01 20:02:30 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2006-12-01 20:02:30 +0100 |
commit | 701f649aa304e547639fb8bbfdfec0753e9b3b9a (patch) | |
tree | cf491729e5ca4a222a7fd7fe7205e5157de05f77 /include/i2c.h | |
parent | 5c97aeb8d8b780b10a1cb0beaca196c009f5a62a (diff) | |
parent | dd520bf314c7add4183c5191692180f576f96b60 (diff) | |
download | u-boot-imx-701f649aa304e547639fb8bbfdfec0753e9b3b9a.zip u-boot-imx-701f649aa304e547639fb8bbfdfec0753e9b3b9a.tar.gz u-boot-imx-701f649aa304e547639fb8bbfdfec0753e9b3b9a.tar.bz2 |
Merge with git+ssh://sr@pollux.denx.org/home/sr/git/u-boot/denx/.git
Diffstat (limited to 'include/i2c.h')
-rw-r--r-- | include/i2c.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h index 6d39080..a8f729a 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -82,4 +82,49 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len); uchar i2c_reg_read (uchar chip, uchar reg); void i2c_reg_write(uchar chip, uchar reg, uchar val); +/* + * Functions for setting the current I2C bus and its speed + */ + +/* + * i2c_set_bus_num: + * + * Change the active I2C bus. Subsequent read/write calls will + * go to this one. + * + * bus - bus index, zero based + * + * Returns: 0 on success, not 0 on failure + * + */ +int i2c_set_bus_num(unsigned int bus); + +/* + * i2c_get_bus_num: + * + * Returns index of currently active I2C bus. Zero-based. + */ + +unsigned int i2c_get_bus_num(void); + +/* + * i2c_set_bus_speed: + * + * Change the speed of the active I2C bus + * + * speed - bus speed in Hz + * + * Returns: 0 on success, not 0 on failure + * + */ +int i2c_set_bus_speed(unsigned int); + +/* + * i2c_get_bus_speed: + * + * Returns speed of currently active I2C bus in Hz + */ + +unsigned int i2c_get_bus_speed(void); + #endif /* _I2C_H_ */ |