Lines Matching refs:transfer

88 	data->transfer.msgs = msgs;  in lpc11u6x_i2c_transfer()
89 data->transfer.curr_buf = msgs->buf; in lpc11u6x_i2c_transfer()
90 data->transfer.curr_len = msgs->len; in lpc11u6x_i2c_transfer()
91 data->transfer.nr_msgs = num_msgs; in lpc11u6x_i2c_transfer()
92 data->transfer.addr = addr; in lpc11u6x_i2c_transfer()
99 data->transfer.status = LPC11U6X_I2C_STATUS_BUSY; in lpc11u6x_i2c_transfer()
104 if (data->transfer.status != LPC11U6X_I2C_STATUS_OK) { in lpc11u6x_i2c_transfer()
107 data->transfer.status = LPC11U6X_I2C_STATUS_INACTIVE; in lpc11u6x_i2c_transfer()
177 struct lpc11u6x_i2c_current_transfer *transfer = &data->transfer; in lpc11u6x_i2c_isr() local
186 i2c->dat = (transfer->addr << 1) | in lpc11u6x_i2c_isr()
187 (transfer->msgs->flags & I2C_MSG_READ); in lpc11u6x_i2c_isr()
189 transfer->curr_buf = transfer->msgs->buf; in lpc11u6x_i2c_isr()
190 transfer->curr_len = transfer->msgs->len; in lpc11u6x_i2c_isr()
195 if (!transfer->curr_len) { in lpc11u6x_i2c_isr()
196 transfer->msgs++; in lpc11u6x_i2c_isr()
197 transfer->nr_msgs--; in lpc11u6x_i2c_isr()
198 if (!transfer->nr_msgs) { in lpc11u6x_i2c_isr()
199 transfer->status = LPC11U6X_I2C_STATUS_OK; in lpc11u6x_i2c_isr()
205 i2c->dat = transfer->curr_buf[0]; in lpc11u6x_i2c_isr()
206 transfer->curr_buf++; in lpc11u6x_i2c_isr()
207 transfer->curr_len--; in lpc11u6x_i2c_isr()
213 transfer->msgs++; in lpc11u6x_i2c_isr()
214 transfer->nr_msgs--; in lpc11u6x_i2c_isr()
215 set |= (transfer->nr_msgs ? LPC11U6X_I2C_CONTROL_START : in lpc11u6x_i2c_isr()
217 if (!transfer->nr_msgs) { in lpc11u6x_i2c_isr()
218 transfer->status = LPC11U6X_I2C_STATUS_OK; in lpc11u6x_i2c_isr()
222 transfer->curr_buf[0] = i2c->dat; in lpc11u6x_i2c_isr()
223 transfer->curr_buf++; in lpc11u6x_i2c_isr()
224 transfer->curr_len--; in lpc11u6x_i2c_isr()
227 if (transfer->curr_len <= 1) { in lpc11u6x_i2c_isr()
289 transfer->status = LPC11U6X_I2C_STATUS_FAIL; in lpc11u6x_i2c_isr()
300 if ((transfer->status != LPC11U6X_I2C_STATUS_BUSY) && in lpc11u6x_i2c_isr()
301 (transfer->status != LPC11U6X_I2C_STATUS_INACTIVE)) { in lpc11u6x_i2c_isr()
337 data->transfer.status = LPC11U6X_I2C_STATUS_INACTIVE; in lpc11u6x_i2c_init()
345 .transfer = lpc11u6x_i2c_transfer,