From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 23 Jun 2012 03:51:53 +0200 Subject: [U-Boot] [PATCH 03/24] mxc_i2c: create tx_byte function In-Reply-To: <4FE4FA1C.2010608@boundarydevices.com> References: <1340338339-11626-1-git-send-email-troy.kisky@boundarydevices.com> <201206221858.21712.marex@denx.de> <4FE4FA1C.2010608@boundarydevices.com> Message-ID: <201206230351.53467.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > > > Best regards, > > Marek Vasut Best regards, Marek Vasut