
30 Jan
2008
30 Jan
'08
4:12 p.m.
xiangguo_li@hotmail.com wrote:
hello,
the I2C interface is on hostbridge(Tsi109).
thank you.
I assume you're using the tsi108 driver. Please try applying the following untested patch:
diff --git a/drivers/i2c/tsi108_i2c.c b/drivers/i2c/tsi108_i2c.c index d6736b0..d337c1f 100644 --- a/drivers/i2c/tsi108_i2c.c +++ b/drivers/i2c/tsi108_i2c.c @@ -279,5 +279,20 @@ int i2c_probe (uchar chip) return i2c_read (chip, 0, 1, (uchar *)&tmp, 1); }
+uchar i2c_reg_read(uchar i2c_addr, uchar reg) +{ + uchar buf; + + i2c_read(i2c_addr, reg, 1, &buf, 1); + + return buf; +} + +void i2c_reg_write(uchar i2c_addr, uchar reg, uchar val) +{ + i2c_write(i2c_addr, reg, 1, &val, 1); +} + +