'\" t .\" Title: spi_bus_lock .\" 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_BUS_LOCK" "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_bus_lock \- obtain a lock for exclusive SPI bus usage .SH "SYNOPSIS" .HP \w'int\ spi_bus_lock('u .BI "int spi_bus_lock(struct\ spi_master\ *\ " "master" ");" .SH "ARGUMENTS" .PP \fImaster\fR .RS 4 SPI bus master that should be locked for exclusive bus access .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\&. .PP This call should be used by drivers that require exclusive access to the SPI bus\&. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over\&. Data transfer must be done by spi_sync_locked and spi_async_locked calls when the SPI bus lock is held\&. .PP It returns zero on success, else a negative error code\&. .SH "COPYRIGHT" .br