'\" t .\" Title: spi_sync_locked .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Serial Peripheral Interface (SPI) .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SPI_SYNC_LOCKED" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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_locked \- version of spi_sync with exclusive bus usage .SH "SYNOPSIS" .HP \w'int\ spi_sync_locked('u .BI "int spi_sync_locked(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 This call should be used by drivers that require exclusive access to the SPI bus\&. It has to be preceded by a spi_bus_lock call\&. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over\&. .SH "RETURN" .PP zero on success, else a negative error code\&. .SH "COPYRIGHT" .br