X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fi2c.h;h=a51c16464ffbb3069dca9dcdebfec81d37cbfb11;hb=6508f9cd45bd832ced8ef53a7bff379e88e812fe;hp=54c6f9fbc6c476cd6244dc57b19854602d81b722;hpb=79b2d0bb2eae09602448f7a7cb56530d2f31e6c6;p=u-boot diff --git a/include/i2c.h b/include/i2c.h index 54c6f9fbc6..a51c16464f 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -56,6 +56,17 @@ #define I2C_SET_BUS(a) #endif +/* define the I2C bus number for RTC and DTT if not already done */ +#if !defined(CFG_RTC_BUS_NUM) +#define CFG_RTC_BUS_NUM 0 +#endif +#if !defined(CFG_DTT_BUS_NUM) +#define CFG_DTT_BUS_NUM 0 +#endif +#if !defined(CFG_SPD_BUS_NUM) +#define CFG_SPD_BUS_NUM 0 +#endif + /* * Initialization, must be called once on start up, may be called * repeatedly to change the speed and slave addresses. @@ -102,9 +113,9 @@ void i2c_reg_write(uchar chip, uchar reg, uchar val); * Change the active I2C bus. Subsequent read/write calls will * go to this one. * - * bus - bus index, zero based + * bus - bus index, zero based * - * Returns: 0 on success, not 0 on failure + * Returns: 0 on success, not 0 on failure * */ int i2c_set_bus_num(unsigned int bus); @@ -122,9 +133,9 @@ unsigned int i2c_get_bus_num(void); * * Change the speed of the active I2C bus * - * speed - bus speed in Hz + * speed - bus speed in Hz * - * Returns: 0 on success, not 0 on failure + * Returns: 0 on success, not 0 on failure * */ int i2c_set_bus_speed(unsigned int);