
23 Jun
2012
23 Jun
'12
3:51 a.m.
Dear Troy Kisky,
[...]
@@ -364,7 +340,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len) temp |= I2CR_RSTA;
writeb(temp, &i2c_regs->i2cr);
- ret = i2c_imx_set_chip_addr(chip, 1);
- ret = tx_byte(i2c_regs, (chip << 1) | 1);
Isn't this | 1 and | 0 stuff #define-d somewhere? I think there was I2C_READ_SOMETHING in i2c.h and I2C_WRITE_SOMETHING...
I could not find what you are referring to. All drivers in i2c seem to use "| 1" "| dir" and I2C_READ_BIT, I2C_WRITE_BIT
#define I2C_READ_BIT 1 #define I2C_WRITE_BIT 0
in fsl_i2c.c
But these are not defined in a header file.
You're right. I must have mistaken them for something else. Sorry!
if (ret)
return ret;
Otherwise Acked-by: Marek Vasut marex@denx.de
Best regards, Marek Vasut
Best regards, Marek Vasut