---
name: "spi_sync_locked"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/spi_sync_locked"
---

# spi\_sync\_locked(9)

version of spi\_sync with exclusive bus usage

## NAME

spi\_sync\_locked - version of spi\_sync with exclusive bus usage

## SYNOPSIS

**int spi\_sync\_locked(struct spi\_device \*** *spi***, struct spi\_message \*** *message***);**

## ARGUMENTS

*spi*

device with which data will be exchanged

*message*

describes the data transfers

## CONTEXT

can sleep

## DESCRIPTION

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.

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.

It returns zero on success, else a negative error code.

## COPYRIGHT
