Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
spi_device Struct Reference

#include <spi.h>

Data Fields

struct device dev
 
struct spi_mastermaster
 
u32 max_speed_hz
 
u8 chip_select
 
u8 mode
 
u8 bits_per_word
 
int irq
 
voidcontroller_state
 
voidcontroller_data
 
char modalias [SPI_NAME_SIZE]
 

Detailed Description

struct spi_device - Master side proxy for an SPI slave device : Driver model representation of the device. : SPI controller used with the device. : Maximum clock rate to be used with this chip (on this board); may be changed by the device's driver. The spi_transfer.speed_hz can override this for each transfer. : Chipselect, distinguishing chips handled by . : The spi mode defines how data is clocked out and in. This may be changed by the device's driver. The "active low" default for chipselect mode can be overridden (by specifying SPI_CS_HIGH) as can the "MSB first" default for each word in a transfer (by specifying SPI_LSB_FIRST). : Data transfers involve one or more words; word sizes like eight or 12 bits are common. In-memory wordsizes are powers of two bytes (e.g. 20 bit samples use 32 bits). This may be changed by the device's driver, or left at the default (0) indicating protocol words are eight bit bytes. The spi_transfer.bits_per_word can override this for each transfer. : Negative, or the number passed to request_irq() to receive interrupts from this device. : Controller's runtime state : Board-specific definitions for controller, such as FIFO initialization parameters; from board_info.controller_data : Name of the driver to use with this device, or an alias for that name. This appears in the sysfs "modalias" attribute for driver coldplugging, and in uevents used for hotplugging

A is used to interchange data between an SPI slave (usually a discrete chip) and CPU memory.

In , the platform_data is used to hold information about this device that's meaningful to the device's protocol driver, but not to its controller. One example might be an identifier for a chip variant with slightly different functionality; another might be information about how this particular board wires the chip's pins.

Definition at line 70 of file spi.h.

Field Documentation

u8 bits_per_word

Definition at line 88 of file spi.h.

Definition at line 74 of file spi.h.

void* controller_data

Definition at line 91 of file spi.h.

void* controller_state

Definition at line 90 of file spi.h.

Definition at line 71 of file spi.h.

int irq

Definition at line 89 of file spi.h.

struct spi_master* master

Definition at line 72 of file spi.h.

u32 max_speed_hz

Definition at line 73 of file spi.h.

char modalias[SPI_NAME_SIZE]

Definition at line 92 of file spi.h.

u8 mode

Definition at line 75 of file spi.h.


The documentation for this struct was generated from the following file: