---
name: "spi_add_device"
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_add_device"
---

# spi\_add\_device(9)

Add spi\_device allocated with spi\_alloc\_device

## NAME

spi\_add\_device - Add spi\_device allocated with spi\_alloc\_device

## SYNOPSIS

**int spi\_add\_device(struct spi\_device \*** *spi***);**

## ARGUMENTS

*spi*

spi\_device to register

## DESCRIPTION

Companion function to spi\_alloc\_device. Devices allocated with spi\_alloc\_device can be added onto the spi bus with this function.

Returns 0 on success; negative errno on failure

## COPYRIGHT
