Message ID | 56D6DC04.30803@martin.sperl.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1001,6 +1001,9 @@ static int spi_transfer_one_message(struct spi_master *master, if (msg->status != -EINPROGRESS) goto out; + if (xfer->complete) + xfer->complete(xfer->context); + if (xfer->delay_usecs) udelay(xfer->delay_usecs); diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 520a23d..d2b53c4 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -753,6 +753,9 @@ struct spi_transfer { u16 delay_usecs; u32 speed_hz; + void (*complete)(void *context); + void *context; + struct list_head transfer_list; };