---
name: "spi_new_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_new_device"
---

# spi\_new\_device(9)

instantiate one new SPI device

## NAME

spi\_new\_device - instantiate one new SPI device

## SYNOPSIS

**struct spi\_device \* spi\_new\_device(struct spi\_master \*** *master***, struct spi\_board\_info \*** *chip***);**

## ARGUMENTS

*master*

Controller to which device is connected

*chip*

Describes the SPI device

## CONTEXT

can sleep

## DESCRIPTION

On typical mainboards, this is purely internal; and it's not needed after board init creates the hard-wired devices. Some development platforms may not be able to use spi\_register\_board\_info though, and this is exported so that for example a USB or parport based adapter driver could add devices (which it would learn about out-of-band).

Returns the new device, or NULL.

## COPYRIGHT
