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

#include <spi_gpio.h>

Data Fields

unsigned sck
 
unsigned mosi
 
unsigned miso
 
u16 num_chipselect
 

Detailed Description

struct spi_gpio_platform_data - parameter for bitbanged SPI master : number of the GPIO used for clock output : number of the GPIO used for Master Output, Slave In (MOSI) data : number of the GPIO used for Master Input, Slave Output (MISO) data : how many slaves to allow

All GPIO signals used with the SPI bus managed through this driver (chipselects, MOSI, MISO, SCK) must be configured as GPIOs, instead of some alternate function.

It can be convenient to use this driver with pins that have alternate functions associated with a "native" SPI controller if a driver for that controller is not available, or is missing important functionality.

On platforms which can do so, configure MISO with a weak pullup unless there's an external pullup on that signal. That saves power by avoiding floating signals. (A weak pulldown would save power too, but many drivers expect to see all-ones data as the no slave "response".)

Definition at line 63 of file spi_gpio.h.

Field Documentation

unsigned miso

Definition at line 66 of file spi_gpio.h.

unsigned mosi

Definition at line 65 of file spi_gpio.h.

u16 num_chipselect

Definition at line 68 of file spi_gpio.h.

unsigned sck

Definition at line 64 of file spi_gpio.h.


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