carta
spi_bus_lock(9)

spi_bus_lock9

Obtain a lock for exclusive spi bus usage

Usage

int spi_bus_lock(struct spi_master * master);

Arguments

master

SPI bus master that should be locked for exclusive bus access

Context

can sleep

Overview

This call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout.

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.

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

History

  • Debian 8 (Jessie): the text shown here
  • Debian 7 (Wheezy)

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.