X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fi2c.h;h=668e754e2a804d325c0dc915237ff6a222af0787;hb=a694610d3361465d4c8d27dde72ab8b63d31115e;hp=fad2d571616fcc71ff9f3dbb65b9576aaee714c9;hpb=ef29884b2708a6cce3b77f4ccaeea193d4e02c22;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/i2c.h b/include/i2c.h index fad2d57..668e754 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -78,16 +78,22 @@ #endif #ifdef CONFIG_8xx -/* Set default values for the I2C bus speed and slave address on 8xx. In the +/* Set default value for the I2C bus speed on 8xx. In the * future, we'll define these in all 8xx board config files. */ #ifndef CONFIG_SYS_I2C_SPEED #define CONFIG_SYS_I2C_SPEED 50000 #endif +#endif +/* + * Many boards/controllers/drivers don't support an I2C slave interface so + * provide a default slave address for them for use in common code. A real + * value for CONFIG_SYS_I2C_SLAVE should be defined for any board which does + * support a slave interface. + */ #ifndef CONFIG_SYS_I2C_SLAVE -#define CONFIG_SYS_I2C_SLAVE 0xFE -#endif +#define CONFIG_SYS_I2C_SLAVE 0xfe #endif /* @@ -159,14 +165,7 @@ static inline u8 i2c_reg_read(u8 addr, u8 reg) printf("%s: addr=0x%02x, reg=0x%02x\n", __func__, addr, reg); #endif -#ifdef CONFIG_BLACKFIN - /* This ifdef will become unneccessary in a future version of the - * blackfin I2C driver. - */ - i2c_read(addr, reg, 0, &buf, 1); -#else i2c_read(addr, reg, 1, &buf, 1); -#endif return buf; } @@ -183,14 +182,7 @@ static inline void i2c_reg_write(u8 addr, u8 reg, u8 val) __func__, addr, reg, val); #endif -#ifdef CONFIG_BLACKFIN - /* This ifdef will become unneccessary in a future version of the - * blackfin I2C driver. - */ - i2c_write(addr, reg, 0, &val, 1); -#else i2c_write(addr, reg, 1, &val, 1); -#endif } /*