Lines Matching refs:mesg
162 static int spi_sh_send(struct spi_sh_data *ss, struct spi_message *mesg, in spi_sh_send() argument
209 if (list_is_last(&t->transfer_list, &mesg->transfers)) { in spi_sh_send()
227 static int spi_sh_receive(struct spi_sh_data *ss, struct spi_message *mesg, in spi_sh_receive() argument
286 struct spi_message *mesg; in spi_sh_work() local
295 mesg = list_entry(ss->queue.next, struct spi_message, queue); in spi_sh_work()
296 list_del_init(&mesg->queue); in spi_sh_work()
299 list_for_each_entry(t, &mesg->transfers, transfer_list) { in spi_sh_work()
306 ret = spi_sh_send(ss, mesg, t); in spi_sh_work()
311 ret = spi_sh_receive(ss, mesg, t); in spi_sh_work()
315 mesg->actual_length += t->len; in spi_sh_work()
319 mesg->status = 0; in spi_sh_work()
320 if (mesg->complete) in spi_sh_work()
321 mesg->complete(mesg->context); in spi_sh_work()
338 mesg->status = ret; in spi_sh_work()
339 if (mesg->complete) in spi_sh_work()
340 mesg->complete(mesg->context); in spi_sh_work()
367 static int spi_sh_transfer(struct spi_device *spi, struct spi_message *mesg) in spi_sh_transfer() argument
377 mesg->actual_length = 0; in spi_sh_transfer()
378 mesg->status = -EINPROGRESS; in spi_sh_transfer()
382 list_add_tail(&mesg->queue, &ss->queue); in spi_sh_transfer()