RE: [PATCH V4 2/7] qup: i2c: factor out common code for reuse

2015-07-20 Thread Sricharan
org; linux-arm-msm@vger.kernel.org; > ga...@codeaurora.org; linux-ker...@vger.kernel.org; linux- > i...@vger.kernel.org; agr...@codeaurora.org; dmaeng...@vger.kernel.org; > linux-arm-ker...@lists.infradead.org > Subject: Re: [PATCH V4 2/7] qup: i2c: factor out common code for reuse > >

Re: [PATCH V4 2/7] qup: i2c: factor out common code for reuse

2015-07-20 Thread Ivan T. Ivanov
Hi Sricharan, On Thu, 2015-07-09 at 08:55 +0530, Sricharan R wrote: > > static int qup_i2c_read_one(struct qup_i2c_dev *qup, struct i2c_msg *msg) > { > - unsigned long left; > - int ret; > + int ret = 0; > > - qup->msg = msg; > - qup->pos = 0; > + /* > +

[PATCH V4 2/7] qup: i2c: factor out common code for reuse

2015-07-08 Thread Sricharan R
The qup_i2c_write/read_one functions can be split to have the common initialization code and function to loop around the data bytes separately. This way the initialization code can be reused while adding v2 tags functionality. Signed-off-by: Sricharan R --- drivers/i2c/busses/i2c-qup.c | 147 +++