Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
m5602_bridge.h File Reference
#include <linux/slab.h>
#include "gspca.h"

Go to the source code of this file.

Data Structures

struct  sd
 

Macros

#define MODULE_NAME   "ALi m5602"
 
#define M5602_XB_SENSOR_TYPE   0x00
 
#define M5602_XB_SENSOR_CTRL   0x01
 
#define M5602_XB_LINE_OF_FRAME_H   0x02
 
#define M5602_XB_LINE_OF_FRAME_L   0x03
 
#define M5602_XB_PIX_OF_LINE_H   0x04
 
#define M5602_XB_PIX_OF_LINE_L   0x05
 
#define M5602_XB_VSYNC_PARA   0x06
 
#define M5602_XB_HSYNC_PARA   0x07
 
#define M5602_XB_TEST_MODE_1   0x08
 
#define M5602_XB_TEST_MODE_2   0x09
 
#define M5602_XB_SIG_INI   0x0a
 
#define M5602_XB_DS_PARA   0x0e
 
#define M5602_XB_TRIG_PARA   0x0f
 
#define M5602_XB_CLK_PD   0x10
 
#define M5602_XB_MCU_CLK_CTRL   0x12
 
#define M5602_XB_MCU_CLK_DIV   0x13
 
#define M5602_XB_SEN_CLK_CTRL   0x14
 
#define M5602_XB_SEN_CLK_DIV   0x15
 
#define M5602_XB_AUD_CLK_CTRL   0x16
 
#define M5602_XB_AUD_CLK_DIV   0x17
 
#define M5602_OB_AC_LINK_STATE   0x22
 
#define M5602_OB_PCM_SLOT_INDEX   0x24
 
#define M5602_OB_GPIO_SLOT_INDEX   0x25
 
#define M5602_OB_ACRX_STATUS_ADDRESS_H   0x28
 
#define M5602_OB_ACRX_STATUS_DATA_L   0x29
 
#define M5602_OB_ACRX_STATUS_DATA_H   0x2a
 
#define M5602_OB_ACTX_COMMAND_ADDRESS   0x31
 
#define M5602_OB_ACRX_COMMAND_DATA_L   0x32
 
#define M5602_OB_ACTX_COMMAND_DATA_H   0X33
 
#define M5602_XB_DEVCTR1   0x41
 
#define M5602_XB_EPSETR0   0x42
 
#define M5602_XB_EPAFCTR   0x47
 
#define M5602_XB_EPBFCTR   0x49
 
#define M5602_XB_EPEFCTR   0x4f
 
#define M5602_XB_TEST_REG   0x53
 
#define M5602_XB_ALT2SIZE   0x54
 
#define M5602_XB_ALT3SIZE   0x55
 
#define M5602_XB_OBSFRAME   0x56
 
#define M5602_XB_PWR_CTL   0x59
 
#define M5602_XB_ADC_CTRL   0x60
 
#define M5602_XB_ADC_DATA   0x61
 
#define M5602_XB_MISC_CTRL   0x62
 
#define M5602_XB_SNAPSHOT   0x63
 
#define M5602_XB_SCRATCH_1   0x64
 
#define M5602_XB_SCRATCH_2   0x65
 
#define M5602_XB_SCRATCH_3   0x66
 
#define M5602_XB_SCRATCH_4   0x67
 
#define M5602_XB_I2C_CTRL   0x68
 
#define M5602_XB_I2C_CLK_DIV   0x69
 
#define M5602_XB_I2C_DEV_ADDR   0x6a
 
#define M5602_XB_I2C_REG_ADDR   0x6b
 
#define M5602_XB_I2C_DATA   0x6c
 
#define M5602_XB_I2C_STATUS   0x6d
 
#define M5602_XB_GPIO_DAT_H   0x70
 
#define M5602_XB_GPIO_DAT_L   0x71
 
#define M5602_XB_GPIO_DIR_H   0x72
 
#define M5602_XB_GPIO_DIR_L   0x73
 
#define M5602_XB_GPIO_EN_H   0x74
 
#define M5602_XB_GPIO_EN_L   0x75
 
#define M5602_XB_GPIO_DAT   0x76
 
#define M5602_XB_GPIO_DIR   0x77
 
#define M5602_XB_SEN_CLK_CONTROL   0x80
 
#define M5602_XB_SEN_CLK_DIVISION   0x81
 
#define M5602_XB_CPR_CLK_CONTROL   0x82
 
#define M5602_XB_CPR_CLK_DIVISION   0x83
 
#define M5602_XB_MCU_CLK_CONTROL   0x84
 
#define M5602_XB_MCU_CLK_DIVISION   0x85
 
#define M5602_XB_DCT_CLK_CONTROL   0x86
 
#define M5602_XB_DCT_CLK_DIVISION   0x87
 
#define M5602_XB_EC_CLK_CONTROL   0x88
 
#define M5602_XB_EC_CLK_DIVISION   0x89
 
#define M5602_XB_LBUF_CLK_CONTROL   0x8a
 
#define M5602_XB_LBUF_CLK_DIVISION   0x8b
 
#define I2C_BUSY   0x80
 
#define DRIVER_AUTHOR   "ALi m5602 Linux Driver Project"
 
#define DRIVER_DESC   "ALi m5602 webcam driver"
 
#define M5602_ISOC_ENDPOINT_ADDR   0x81
 
#define M5602_INTR_ENDPOINT_ADDR   0x82
 
#define M5602_URB_MSG_TIMEOUT   5000
 

Functions

int m5602_read_bridge (struct sd *sd, const u8 address, u8 *i2c_data)
 
int m5602_write_bridge (struct sd *sd, const u8 address, const u8 i2c_data)
 
int m5602_write_sensor (struct sd *sd, const u8 address, u8 *i2c_data, const u8 len)
 
int m5602_read_sensor (struct sd *sd, const u8 address, u8 *i2c_data, const u8 len)
 

Macro Definition Documentation

#define DRIVER_AUTHOR   "ALi m5602 Linux Driver Project"

Definition at line 108 of file m5602_bridge.h.

#define DRIVER_DESC   "ALi m5602 webcam driver"

Definition at line 109 of file m5602_bridge.h.

#define I2C_BUSY   0x80

Definition at line 103 of file m5602_bridge.h.

#define M5602_INTR_ENDPOINT_ADDR   0x82

Definition at line 112 of file m5602_bridge.h.

#define M5602_ISOC_ENDPOINT_ADDR   0x81

Definition at line 111 of file m5602_bridge.h.

#define M5602_OB_AC_LINK_STATE   0x22

Definition at line 49 of file m5602_bridge.h.

#define M5602_OB_ACRX_COMMAND_DATA_L   0x32

Definition at line 56 of file m5602_bridge.h.

#define M5602_OB_ACRX_STATUS_ADDRESS_H   0x28

Definition at line 52 of file m5602_bridge.h.

#define M5602_OB_ACRX_STATUS_DATA_H   0x2a

Definition at line 54 of file m5602_bridge.h.

#define M5602_OB_ACRX_STATUS_DATA_L   0x29

Definition at line 53 of file m5602_bridge.h.

#define M5602_OB_ACTX_COMMAND_ADDRESS   0x31

Definition at line 55 of file m5602_bridge.h.

#define M5602_OB_ACTX_COMMAND_DATA_H   0X33

Definition at line 57 of file m5602_bridge.h.

#define M5602_OB_GPIO_SLOT_INDEX   0x25

Definition at line 51 of file m5602_bridge.h.

#define M5602_OB_PCM_SLOT_INDEX   0x24

Definition at line 50 of file m5602_bridge.h.

#define M5602_URB_MSG_TIMEOUT   5000

Definition at line 114 of file m5602_bridge.h.

#define M5602_XB_ADC_CTRL   0x60

Definition at line 68 of file m5602_bridge.h.

#define M5602_XB_ADC_DATA   0x61

Definition at line 69 of file m5602_bridge.h.

#define M5602_XB_ALT2SIZE   0x54

Definition at line 64 of file m5602_bridge.h.

#define M5602_XB_ALT3SIZE   0x55

Definition at line 65 of file m5602_bridge.h.

#define M5602_XB_AUD_CLK_CTRL   0x16

Definition at line 47 of file m5602_bridge.h.

#define M5602_XB_AUD_CLK_DIV   0x17

Definition at line 48 of file m5602_bridge.h.

#define M5602_XB_CLK_PD   0x10

Definition at line 42 of file m5602_bridge.h.

#define M5602_XB_CPR_CLK_CONTROL   0x82

Definition at line 92 of file m5602_bridge.h.

#define M5602_XB_CPR_CLK_DIVISION   0x83

Definition at line 93 of file m5602_bridge.h.

#define M5602_XB_DCT_CLK_CONTROL   0x86

Definition at line 96 of file m5602_bridge.h.

#define M5602_XB_DCT_CLK_DIVISION   0x87

Definition at line 97 of file m5602_bridge.h.

#define M5602_XB_DEVCTR1   0x41

Definition at line 58 of file m5602_bridge.h.

#define M5602_XB_DS_PARA   0x0e

Definition at line 40 of file m5602_bridge.h.

#define M5602_XB_EC_CLK_CONTROL   0x88

Definition at line 98 of file m5602_bridge.h.

#define M5602_XB_EC_CLK_DIVISION   0x89

Definition at line 99 of file m5602_bridge.h.

#define M5602_XB_EPAFCTR   0x47

Definition at line 60 of file m5602_bridge.h.

#define M5602_XB_EPBFCTR   0x49

Definition at line 61 of file m5602_bridge.h.

#define M5602_XB_EPEFCTR   0x4f

Definition at line 62 of file m5602_bridge.h.

#define M5602_XB_EPSETR0   0x42

Definition at line 59 of file m5602_bridge.h.

#define M5602_XB_GPIO_DAT   0x76

Definition at line 88 of file m5602_bridge.h.

#define M5602_XB_GPIO_DAT_H   0x70

Definition at line 82 of file m5602_bridge.h.

#define M5602_XB_GPIO_DAT_L   0x71

Definition at line 83 of file m5602_bridge.h.

#define M5602_XB_GPIO_DIR   0x77

Definition at line 89 of file m5602_bridge.h.

#define M5602_XB_GPIO_DIR_H   0x72

Definition at line 84 of file m5602_bridge.h.

#define M5602_XB_GPIO_DIR_L   0x73

Definition at line 85 of file m5602_bridge.h.

#define M5602_XB_GPIO_EN_H   0x74

Definition at line 86 of file m5602_bridge.h.

#define M5602_XB_GPIO_EN_L   0x75

Definition at line 87 of file m5602_bridge.h.

#define M5602_XB_HSYNC_PARA   0x07

Definition at line 36 of file m5602_bridge.h.

#define M5602_XB_I2C_CLK_DIV   0x69

Definition at line 77 of file m5602_bridge.h.

#define M5602_XB_I2C_CTRL   0x68

Definition at line 76 of file m5602_bridge.h.

#define M5602_XB_I2C_DATA   0x6c

Definition at line 80 of file m5602_bridge.h.

#define M5602_XB_I2C_DEV_ADDR   0x6a

Definition at line 78 of file m5602_bridge.h.

#define M5602_XB_I2C_REG_ADDR   0x6b

Definition at line 79 of file m5602_bridge.h.

#define M5602_XB_I2C_STATUS   0x6d

Definition at line 81 of file m5602_bridge.h.

#define M5602_XB_LBUF_CLK_CONTROL   0x8a

Definition at line 100 of file m5602_bridge.h.

#define M5602_XB_LBUF_CLK_DIVISION   0x8b

Definition at line 101 of file m5602_bridge.h.

#define M5602_XB_LINE_OF_FRAME_H   0x02

Definition at line 31 of file m5602_bridge.h.

#define M5602_XB_LINE_OF_FRAME_L   0x03

Definition at line 32 of file m5602_bridge.h.

#define M5602_XB_MCU_CLK_CONTROL   0x84

Definition at line 94 of file m5602_bridge.h.

#define M5602_XB_MCU_CLK_CTRL   0x12

Definition at line 43 of file m5602_bridge.h.

#define M5602_XB_MCU_CLK_DIV   0x13

Definition at line 44 of file m5602_bridge.h.

#define M5602_XB_MCU_CLK_DIVISION   0x85

Definition at line 95 of file m5602_bridge.h.

#define M5602_XB_MISC_CTRL   0x62

Definition at line 70 of file m5602_bridge.h.

#define M5602_XB_OBSFRAME   0x56

Definition at line 66 of file m5602_bridge.h.

#define M5602_XB_PIX_OF_LINE_H   0x04

Definition at line 33 of file m5602_bridge.h.

#define M5602_XB_PIX_OF_LINE_L   0x05

Definition at line 34 of file m5602_bridge.h.

#define M5602_XB_PWR_CTL   0x59

Definition at line 67 of file m5602_bridge.h.

#define M5602_XB_SCRATCH_1   0x64

Definition at line 72 of file m5602_bridge.h.

#define M5602_XB_SCRATCH_2   0x65

Definition at line 73 of file m5602_bridge.h.

#define M5602_XB_SCRATCH_3   0x66

Definition at line 74 of file m5602_bridge.h.

#define M5602_XB_SCRATCH_4   0x67

Definition at line 75 of file m5602_bridge.h.

#define M5602_XB_SEN_CLK_CONTROL   0x80

Definition at line 90 of file m5602_bridge.h.

#define M5602_XB_SEN_CLK_CTRL   0x14

Definition at line 45 of file m5602_bridge.h.

#define M5602_XB_SEN_CLK_DIV   0x15

Definition at line 46 of file m5602_bridge.h.

#define M5602_XB_SEN_CLK_DIVISION   0x81

Definition at line 91 of file m5602_bridge.h.

#define M5602_XB_SENSOR_CTRL   0x01

Definition at line 30 of file m5602_bridge.h.

#define M5602_XB_SENSOR_TYPE   0x00

Definition at line 29 of file m5602_bridge.h.

#define M5602_XB_SIG_INI   0x0a

Definition at line 39 of file m5602_bridge.h.

#define M5602_XB_SNAPSHOT   0x63

Definition at line 71 of file m5602_bridge.h.

#define M5602_XB_TEST_MODE_1   0x08

Definition at line 37 of file m5602_bridge.h.

#define M5602_XB_TEST_MODE_2   0x09

Definition at line 38 of file m5602_bridge.h.

#define M5602_XB_TEST_REG   0x53

Definition at line 63 of file m5602_bridge.h.

#define M5602_XB_TRIG_PARA   0x0f

Definition at line 41 of file m5602_bridge.h.

#define M5602_XB_VSYNC_PARA   0x06

Definition at line 35 of file m5602_bridge.h.

#define MODULE_NAME   "ALi m5602"

Definition at line 25 of file m5602_bridge.h.

Function Documentation

int m5602_read_bridge ( struct sd sd,
const u8  address,
u8 i2c_data 
)

Definition at line 41 of file m5602_core.c.

int m5602_read_sensor ( struct sd sd,
const u8  address,
u8 i2c_data,
const u8  len 
)

Definition at line 97 of file m5602_core.c.

int m5602_write_bridge ( struct sd sd,
const u8  address,
const u8  i2c_data 
)

Definition at line 62 of file m5602_core.c.

int m5602_write_sensor ( struct sd sd,
const u8  address,
u8 i2c_data,
const u8  len 
)

Definition at line 145 of file m5602_core.c.