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

Go to the source code of this file.

Data Structures

struct  mcp
 
struct  mcp_ops
 
struct  mcp_driver
 

Macros

#define mcp_get_sclk_rate(mcp)   ((mcp)->sclk_rate)
 
#define mcp_get_drvdata(mcp)   dev_get_drvdata(&(mcp)->attached_device)
 
#define mcp_set_drvdata(mcp, d)   dev_set_drvdata(&(mcp)->attached_device, d)
 

Functions

void mcp_set_telecom_divisor (struct mcp *, unsigned int)
 
void mcp_set_audio_divisor (struct mcp *, unsigned int)
 
void mcp_reg_write (struct mcp *, unsigned int, unsigned int)
 
unsigned int mcp_reg_read (struct mcp *, unsigned int)
 
void mcp_enable (struct mcp *)
 
void mcp_disable (struct mcp *)
 
struct mcpmcp_host_alloc (struct device *, size_t)
 
int mcp_host_add (struct mcp *, void *)
 
void mcp_host_del (struct mcp *)
 
void mcp_host_free (struct mcp *)
 
int mcp_driver_register (struct mcp_driver *)
 
void mcp_driver_unregister (struct mcp_driver *)
 

Macro Definition Documentation

#define mcp_get_drvdata (   mcp)    dev_get_drvdata(&(mcp)->attached_device)

Definition at line 56 of file mcp.h.

#define mcp_get_sclk_rate (   mcp)    ((mcp)->sclk_rate)

Definition at line 40 of file mcp.h.

#define mcp_set_drvdata (   mcp,
  d 
)    dev_set_drvdata(&(mcp)->attached_device, d)

Definition at line 57 of file mcp.h.

Function Documentation

void mcp_disable ( struct mcp mcp)

mcp_disable - disable the MCP interface : MCP interface to disable

Disable the MCP interface. The MCP interface will only be disabled once the number of calls to mcp_enable matches the number of calls to mcp_disable.

Definition at line 155 of file mcp-core.c.

int mcp_driver_register ( struct mcp_driver )

Definition at line 210 of file mcp-core.c.

void mcp_driver_unregister ( struct mcp_driver )

Definition at line 217 of file mcp-core.c.

void mcp_enable ( struct mcp mcp)

mcp_enable - enable the MCP interface : MCP interface to enable

Enable the MCP interface. Each call to mcp_enable will need a corresponding call to mcp_disable to disable the interface.

Definition at line 137 of file mcp-core.c.

int mcp_host_add ( struct mcp ,
void  
)

Definition at line 190 of file mcp-core.c.

struct mcp* mcp_host_alloc ( struct device ,
size_t   
)
read

Definition at line 173 of file mcp-core.c.

void mcp_host_del ( struct mcp )

Definition at line 198 of file mcp-core.c.

void mcp_host_free ( struct mcp )

Definition at line 204 of file mcp-core.c.

unsigned int mcp_reg_read ( struct mcp mcp,
unsigned int  reg 
)

mcp_reg_read - read a device register : MCP interface structure : 4-bit register index

Read a device register and return its value. The MCP interface must be enabled to prevent this function hanging.

Definition at line 117 of file mcp-core.c.

void mcp_reg_write ( struct mcp mcp,
unsigned int  reg,
unsigned int  val 
)

mcp_reg_write - write a device register : MCP interface structure : 4-bit register index : 16-bit data value

Write a device register. The MCP interface must be enabled to prevent this function hanging.

Definition at line 99 of file mcp-core.c.

void mcp_set_audio_divisor ( struct mcp mcp,
unsigned int  div 
)

mcp_set_audio_divisor - set the audio divisor : MCP interface structure : SIB clock divisor

Set the audio divisor on the MCP interface.

Definition at line 80 of file mcp-core.c.

void mcp_set_telecom_divisor ( struct mcp mcp,
unsigned int  div 
)

mcp_set_telecom_divisor - set the telecom divisor : MCP interface structure : SIB clock divisor

Set the telecom divisor on the MCP interface. The resulting sample rate is SIBCLOCK/div.

Definition at line 63 of file mcp-core.c.