Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
ssp.h File Reference

Go to the source code of this file.

Data Structures

struct  ssp_state
 

Functions

int ssp_write_word (u16 data)
 
int ssp_read_word (u16 *data)
 
int ssp_flush (void)
 
void ssp_enable (void)
 
void ssp_disable (void)
 
void ssp_save_state (struct ssp_state *ssp)
 
void ssp_restore_state (struct ssp_state *ssp)
 
int ssp_init (void)
 
void ssp_exit (void)
 

Function Documentation

void ssp_disable ( void  )

ssp_disable - shut down the SSP port

Turn off the SSP port, optionally powering it down.

Definition at line 150 of file ssp.c.

void ssp_enable ( void  )

ssp_enable - enable the SSP port

Turn on the SSP port.

Definition at line 140 of file ssp.c.

void ssp_exit ( void  )

ssp_exit - undo the effects of ssp_init

release and free resources for the SSP port.

Definition at line 223 of file ssp.c.

int ssp_flush ( void  )

ssp_flush - flush the transmit and receive FIFOs

Wait for the SSP to idle, and ensure that the receive FIFO is empty.

The caller is expected to perform the necessary locking.

Returns: %-ETIMEDOUT timeout occurred 0 success

Definition at line 118 of file ssp.c.

int ssp_init ( void  )

ssp_init - setup the SSP port

initialise and claim resources for the SSP port.

Returns: %-ENODEV if the SSP port is unavailable %-EBUSY if the resources are already in use %0 on success

Definition at line 194 of file ssp.c.

int ssp_read_word ( u16 data)

ssp_read_word - read a word from the SSP port

Wait for a data word in the SSP receive FIFO, and return the received data. Data is LSB justified.

Note: Currently, if data is not expected to be received, this function will wait for ever.

The caller is expected to perform the necessary locking.

Returns: %-ETIMEDOUT timeout occurred 16-bit data success

Definition at line 91 of file ssp.c.

void ssp_restore_state ( struct ssp_state ssp)

ssp_restore_state - restore a previously saved SSP configuration : pointer to configuration saved by ssp_save_state

Restore the SSP configuration saved previously by ssp_save_state.

Definition at line 175 of file ssp.c.

void ssp_save_state ( struct ssp_state ssp)

ssp_save_state - save the SSP configuration : pointer to structure to save SSP configuration

Save the configured SSP state for suspend.

Definition at line 161 of file ssp.c.

int ssp_write_word ( u16  data)

ssp_write_word - write a word to the SSP port : 16-bit, MSB justified data to write.

Wait for a free entry in the SSP transmit FIFO, and write a data word to the SSP port. Wait for the SSP port to start sending the data.

The caller is expected to perform the necessary locking.

Returns: %-ETIMEDOUT timeout occurred 0 success

Definition at line 54 of file ssp.c.