Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mxl111sf-gpio.c File Reference
#include "mxl111sf-gpio.h"
#include "mxl111sf-i2c.h"
#include "mxl111sf.h"

Go to the source code of this file.

Data Structures

struct  mxl_gpio_cfg
 

Macros

#define MXL_GPIO_MUX_REG_0   0x84
 
#define MXL_GPIO_MUX_REG_1   0x89
 
#define MXL_GPIO_MUX_REG_2   0x82
 
#define MXL_GPIO_DIR_INPUT   0
 
#define MXL_GPIO_DIR_OUTPUT   1
 
#define PIN_MUX_MPEG_MODE_MASK   0x40 /* 0x17 <6> */
 
#define PIN_MUX_MPEG_PAR_EN_MASK   0x01 /* 0x18 <0> */
 
#define PIN_MUX_MPEG_SER_EN_MASK   0x02 /* 0x18 <1> */
 
#define PIN_MUX_MPG_IN_MUX_MASK   0x80 /* 0x3D <7> */
 
#define PIN_MUX_BT656_ENABLE_MASK   0x04 /* 0x12 <2> */
 
#define PIN_MUX_I2S_ENABLE_MASK   0x40 /* 0x15 <6> */
 
#define PIN_MUX_SPI_MODE_MASK   0x10 /* 0x3D <4> */
 
#define PIN_MUX_MCLK_EN_CTRL_MASK   0x10 /* 0x82 <4> */
 
#define PIN_MUX_MPSYN_EN_CTRL_MASK   0x20 /* 0x82 <5> */
 
#define PIN_MUX_MDVAL_EN_CTRL_MASK   0x40 /* 0x82 <6> */
 
#define PIN_MUX_MPERR_EN_CTRL_MASK   0x80 /* 0x82 <7> */
 
#define PIN_MUX_MDAT_EN_0_MASK   0x10 /* 0x84 <4> */
 
#define PIN_MUX_MDAT_EN_1_MASK   0x20 /* 0x84 <5> */
 
#define PIN_MUX_MDAT_EN_2_MASK   0x40 /* 0x84 <6> */
 
#define PIN_MUX_MDAT_EN_3_MASK   0x80 /* 0x84 <7> */
 
#define PIN_MUX_MDAT_EN_4_MASK   0x10 /* 0x89 <4> */
 
#define PIN_MUX_MDAT_EN_5_MASK   0x20 /* 0x89 <5> */
 
#define PIN_MUX_MDAT_EN_6_MASK   0x40 /* 0x89 <6> */
 
#define PIN_MUX_MDAT_EN_7_MASK   0x80 /* 0x89 <7> */
 
#define PCA9534_I2C_ADDR   (0x40 >> 1)
 

Functions

int mxl111sf_config_pin_mux_modes (struct mxl111sf_state *state, enum mxl111sf_mux_config pin_mux_config)
 
int mxl111sf_set_gpio (struct mxl111sf_state *state, int gpio, int val)
 
int mxl111sf_init_port_expander (struct mxl111sf_state *state)
 
int mxl111sf_gpio_mode_switch (struct mxl111sf_state *state, unsigned int mode)
 

Macro Definition Documentation

#define MXL_GPIO_DIR_INPUT   0

Definition at line 31 of file mxl111sf-gpio.c.

#define MXL_GPIO_DIR_OUTPUT   1

Definition at line 32 of file mxl111sf-gpio.c.

#define MXL_GPIO_MUX_REG_0   0x84

Definition at line 27 of file mxl111sf-gpio.c.

#define MXL_GPIO_MUX_REG_1   0x89

Definition at line 28 of file mxl111sf-gpio.c.

#define MXL_GPIO_MUX_REG_2   0x82

Definition at line 29 of file mxl111sf-gpio.c.

#define PCA9534_I2C_ADDR   (0x40 >> 1)

Definition at line 582 of file mxl111sf-gpio.c.

#define PIN_MUX_BT656_ENABLE_MASK   0x04 /* 0x12 <2> */

Definition at line 198 of file mxl111sf-gpio.c.

#define PIN_MUX_I2S_ENABLE_MASK   0x40 /* 0x15 <6> */

Definition at line 199 of file mxl111sf-gpio.c.

#define PIN_MUX_MCLK_EN_CTRL_MASK   0x10 /* 0x82 <4> */

Definition at line 201 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_0_MASK   0x10 /* 0x84 <4> */

Definition at line 205 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_1_MASK   0x20 /* 0x84 <5> */

Definition at line 206 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_2_MASK   0x40 /* 0x84 <6> */

Definition at line 207 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_3_MASK   0x80 /* 0x84 <7> */

Definition at line 208 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_4_MASK   0x10 /* 0x89 <4> */

Definition at line 209 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_5_MASK   0x20 /* 0x89 <5> */

Definition at line 210 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_6_MASK   0x40 /* 0x89 <6> */

Definition at line 211 of file mxl111sf-gpio.c.

#define PIN_MUX_MDAT_EN_7_MASK   0x80 /* 0x89 <7> */

Definition at line 212 of file mxl111sf-gpio.c.

#define PIN_MUX_MDVAL_EN_CTRL_MASK   0x40 /* 0x82 <6> */

Definition at line 203 of file mxl111sf-gpio.c.

#define PIN_MUX_MPEG_MODE_MASK   0x40 /* 0x17 <6> */

Definition at line 194 of file mxl111sf-gpio.c.

#define PIN_MUX_MPEG_PAR_EN_MASK   0x01 /* 0x18 <0> */

Definition at line 195 of file mxl111sf-gpio.c.

#define PIN_MUX_MPEG_SER_EN_MASK   0x02 /* 0x18 <1> */

Definition at line 196 of file mxl111sf-gpio.c.

#define PIN_MUX_MPERR_EN_CTRL_MASK   0x80 /* 0x82 <7> */

Definition at line 204 of file mxl111sf-gpio.c.

#define PIN_MUX_MPG_IN_MUX_MASK   0x80 /* 0x3D <7> */

Definition at line 197 of file mxl111sf-gpio.c.

#define PIN_MUX_MPSYN_EN_CTRL_MASK   0x20 /* 0x82 <5> */

Definition at line 202 of file mxl111sf-gpio.c.

#define PIN_MUX_SPI_MODE_MASK   0x10 /* 0x3D <4> */

Definition at line 200 of file mxl111sf-gpio.c.

Function Documentation

int mxl111sf_config_pin_mux_modes ( struct mxl111sf_state state,
enum mxl111sf_mux_config  pin_mux_config 
)

Definition at line 214 of file mxl111sf-gpio.c.

int mxl111sf_gpio_mode_switch ( struct mxl111sf_state state,
unsigned int  mode 
)

Definition at line 719 of file mxl111sf-gpio.c.

int mxl111sf_init_port_expander ( struct mxl111sf_state state)

Definition at line 698 of file mxl111sf-gpio.c.

int mxl111sf_set_gpio ( struct mxl111sf_state state,
int  gpio,
int  val 
)

Definition at line 640 of file mxl111sf-gpio.c.