diff options
author | roy zang <tie-fei.zang@freescale.com> | 2006-12-01 12:09:33 +0800 |
---|---|---|
committer | Zang Tiefei <roy@bus.ap.freescale.net> | 2006-12-01 12:09:33 +0800 |
commit | e0b369e4f71b11dd5716903dd6258028cf07e6e8 (patch) | |
tree | 615986f2b3088072c49d74e1086650e185087698 /include/i2c.h | |
parent | ee311214e0d216f904feea269599d0934bf71f23 (diff) | |
parent | dd520bf314c7add4183c5191692180f576f96b60 (diff) | |
download | u-boot-imx-e0b369e4f71b11dd5716903dd6258028cf07e6e8.zip u-boot-imx-e0b369e4f71b11dd5716903dd6258028cf07e6e8.tar.gz u-boot-imx-e0b369e4f71b11dd5716903dd6258028cf07e6e8.tar.bz2 |
Fix the confilcts when merging 'master' into hpc2.
The conflicts due to a new mpc7448 p3m7448 board is in the main tree.
Merge branch 'master' into hpc2
Conflicts:
MAKEALL
cpu/74xx_7xx/cpu.c
cpu/74xx_7xx/cpu_init.c
cpu/74xx_7xx/speed.c
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_ */ |