Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

struct_spi_board_info(9) [suse man page]

STRUCT 
SPI_BOARD_INF(9) Serial Peripheral Interface (S STRUCT SPI_BOARD_INF(9) NAME
struct_spi_board_info - board-specific template for a SPI device SYNOPSIS
struct spi_board_info { char modalias[SPI_NAME_SIZE]; const void * platform_data; void * controller_data; int irq; u32 max_speed_hz; u16 bus_num; u16 chip_select; u8 mode; }; MEMBERS
modalias[SPI_NAME_SIZE] Initializes spi_device.modalias; identifies the driver. platform_data Initializes spi_device.platform_data; the particular data stored there is driver-specific. controller_data Initializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA. irq Initializes spi_device.irq; depends on how the board is wired. max_speed_hz Initializes spi_device.max_speed_hz; based on limits from the chip datasheet and board-specific signal quality issues. bus_num Identifies which spi_master parents the spi_device; unused by spi_new_device, and otherwise depends on board wiring. chip_select Initializes spi_device.chip_select; depends on how the board is wired. mode Initializes spi_device.mode; based on the chip datasheet, board wiring (some devices support both 3WIRE and standard modes), and possibly presence of an inverter in the chipselect path. DESCRIPTION
When adding new SPI devices to the device tree, these structures serve as a partial device template. They hold information which can't always be determined by drivers. Information that probe can establish (such as the default transfer wordsize) is not included here. These structures are used in two places. Their primary role is to be stored in tables of board-specific device descriptors, which are declared early in board initialization and then used (much later) to populate a controller's device tree after the that controller's driver initializes. A secondary (and atypical) role is as a parameter to spi_new_device call, which happens after those controller drivers are active in some dynamic board configuration models. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 STRUCT SPI_BOARD_INF(9)

Check Out this Related Man Page

STRUCT 
SPI_MASTER(9) Serial Peripheral Interface (S STRUCT SPI_MASTER(9) NAME
struct_spi_master - interface to SPI master controller SYNOPSIS
struct spi_master { struct device dev; s16 bus_num; u16 num_chipselect; u16 dma_alignment; u16 mode_bits; u16 flags; #define SPI_MASTER_HALF_DUPLEX BIT(0) #define SPI_MASTER_NO_RX BIT(1) #define SPI_MASTER_NO_TX BIT(2) int (* setup) (struct spi_device *spi); int (* transfer) (struct spi_device *spi,struct spi_message *mesg); void (* cleanup) (struct spi_device *spi); }; MEMBERS
dev device interface to this driver bus_num board-specific (and often SOC-specific) identifier for a given SPI controller. num_chipselect chipselects are used to distinguish individual SPI slaves, and are numbered from zero to num_chipselects. each slave has a chipselect signal, but it's common that not every chipselect is connected to a slave. dma_alignment SPI controller constraint on DMA buffers alignment. mode_bits flags understood by this controller driver flags other constraints relevant to this driver setup updates the device mode and clocking records used by a device's SPI controller; protocol code may call this. This must fail if an unrecognized or unsupported mode is requested. It's always safe to call this unless transfers are pending on the device whose settings are being modified. transfer adds a message to the controller's transfer queue. cleanup frees controller-specific state DESCRIPTION
Each SPI master controller can communicate with one or more spi_device children. These make a small bus, sharing MOSI, MISO and SCK signals but not chip select signals. Each device may be configured to use a different clock rate, since those shared signals are ignored unless the chip is selected. The driver for an SPI controller manages access to those devices through a queue of spi_message transactions, copying data between CPU memory and an SPI slave device. For each such message it queues, it calls the message's completion function when the transaction completes. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 STRUCT SPI_MASTER(9)
Man Page