'\" t .\" Title: spi_sync .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Serial Peripheral Interface (SPI) .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "SPI_SYNC" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Serial Peripheral Interface (S" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" spi_sync \- blocking/synchronous SPI data transfers .SH "SYNOPSIS" .HP \w'int\ spi_sync('u .BI "int spi_sync(struct\ spi_device\ *\ " "spi" ", struct\ spi_message\ *\ " "message" ");" .SH "ARGUMENTS" .PP \fIspi\fR .RS 4 device with which data will be exchanged .RE .PP \fImessage\fR .RS 4 describes the data transfers .RE .SH "CONTEXT" .PP can sleep .SH "DESCRIPTION" .PP This call may only be used from a context that may sleep\&. The sleep is non\-interruptible, and has no timeout\&. Low\-overhead controller drivers may DMA directly into and out of the message buffers\&. .PP Note that the SPI device\*(Aqs chip select is active during the message, and then is normally disabled between messages\&. Drivers for some frequently\-used devices may want to minimize costs of selecting a chip, by leaving it selected in anticipation that the next message will go to the same chip\&. (That may increase power usage\&.) .PP Also, the caller is guaranteeing that the memory associated with the message will not be freed before this call returns\&. .PP It returns zero on success, else a negative error code\&. .SH "COPYRIGHT" .br