[U-Boot] [PATCH 03/24] mxc_i2c: create tx_byte function
Marek Vasut
marex at denx.de
Sat Jun 23 03:51:53 CEST 2012
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 at denx.de>
> >
> > Best regards,
> > Marek Vasut
Best regards,
Marek Vasut
More information about the U-Boot
mailing list