Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
adv7180.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <media/v4l2-ioctl.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-chip-ident.h>
#include <linux/mutex.h>

Go to the source code of this file.

Data Structures

struct  adv7180_state
 

Macros

#define ADV7180_INPUT_CONTROL_REG   0x00
 
#define ADV7180_INPUT_CONTROL_AD_PAL_BG_NTSC_J_SECAM   0x00
 
#define ADV7180_INPUT_CONTROL_AD_PAL_BG_NTSC_J_SECAM_PED   0x10
 
#define ADV7180_INPUT_CONTROL_AD_PAL_N_NTSC_J_SECAM   0x20
 
#define ADV7180_INPUT_CONTROL_AD_PAL_N_NTSC_M_SECAM   0x30
 
#define ADV7180_INPUT_CONTROL_NTSC_J   0x40
 
#define ADV7180_INPUT_CONTROL_NTSC_M   0x50
 
#define ADV7180_INPUT_CONTROL_PAL60   0x60
 
#define ADV7180_INPUT_CONTROL_NTSC_443   0x70
 
#define ADV7180_INPUT_CONTROL_PAL_BG   0x80
 
#define ADV7180_INPUT_CONTROL_PAL_N   0x90
 
#define ADV7180_INPUT_CONTROL_PAL_M   0xa0
 
#define ADV7180_INPUT_CONTROL_PAL_M_PED   0xb0
 
#define ADV7180_INPUT_CONTROL_PAL_COMB_N   0xc0
 
#define ADV7180_INPUT_CONTROL_PAL_COMB_N_PED   0xd0
 
#define ADV7180_INPUT_CONTROL_PAL_SECAM   0xe0
 
#define ADV7180_INPUT_CONTROL_PAL_SECAM_PED   0xf0
 
#define ADV7180_INPUT_CONTROL_INSEL_MASK   0x0f
 
#define ADV7180_EXTENDED_OUTPUT_CONTROL_REG   0x04
 
#define ADV7180_EXTENDED_OUTPUT_CONTROL_NTSCDIS   0xC5
 
#define ADV7180_AUTODETECT_ENABLE_REG   0x07
 
#define ADV7180_AUTODETECT_DEFAULT   0x7f
 
#define ADV7180_CON_REG   0x08 /*Unsigned */
 
#define ADV7180_CON_MIN   0
 
#define ADV7180_CON_DEF   128
 
#define ADV7180_CON_MAX   255
 
#define ADV7180_BRI_REG   0x0a /*Signed */
 
#define ADV7180_BRI_MIN   -128
 
#define ADV7180_BRI_DEF   0
 
#define ADV7180_BRI_MAX   127
 
#define ADV7180_HUE_REG   0x0b /*Signed, inverted */
 
#define ADV7180_HUE_MIN   -127
 
#define ADV7180_HUE_DEF   0
 
#define ADV7180_HUE_MAX   128
 
#define ADV7180_ADI_CTRL_REG   0x0e
 
#define ADV7180_ADI_CTRL_IRQ_SPACE   0x20
 
#define ADV7180_PWR_MAN_REG   0x0f
 
#define ADV7180_PWR_MAN_ON   0x04
 
#define ADV7180_PWR_MAN_OFF   0x24
 
#define ADV7180_PWR_MAN_RES   0x80
 
#define ADV7180_STATUS1_REG   0x10
 
#define ADV7180_STATUS1_IN_LOCK   0x01
 
#define ADV7180_STATUS1_AUTOD_MASK   0x70
 
#define ADV7180_STATUS1_AUTOD_NTSM_M_J   0x00
 
#define ADV7180_STATUS1_AUTOD_NTSC_4_43   0x10
 
#define ADV7180_STATUS1_AUTOD_PAL_M   0x20
 
#define ADV7180_STATUS1_AUTOD_PAL_60   0x30
 
#define ADV7180_STATUS1_AUTOD_PAL_B_G   0x40
 
#define ADV7180_STATUS1_AUTOD_SECAM   0x50
 
#define ADV7180_STATUS1_AUTOD_PAL_COMB   0x60
 
#define ADV7180_STATUS1_AUTOD_SECAM_525   0x70
 
#define ADV7180_IDENT_REG   0x11
 
#define ADV7180_ID_7180   0x18
 
#define ADV7180_ICONF1_ADI   0x40
 
#define ADV7180_ICONF1_ACTIVE_LOW   0x01
 
#define ADV7180_ICONF1_PSYNC_ONLY   0x10
 
#define ADV7180_ICONF1_ACTIVE_TO_CLR   0xC0
 
#define ADV7180_SD_SAT_CB_REG   0xe3 /*Unsigned */
 
#define ADV7180_SD_SAT_CR_REG   0xe4 /*Unsigned */
 
#define ADV7180_SAT_MIN   0
 
#define ADV7180_SAT_DEF   128
 
#define ADV7180_SAT_MAX   255
 
#define ADV7180_IRQ1_LOCK   0x01
 
#define ADV7180_IRQ1_UNLOCK   0x02
 
#define ADV7180_ISR1_ADI   0x42
 
#define ADV7180_ICR1_ADI   0x43
 
#define ADV7180_IMR1_ADI   0x44
 
#define ADV7180_IMR2_ADI   0x48
 
#define ADV7180_IRQ3_AD_CHANGE   0x08
 
#define ADV7180_ISR3_ADI   0x4A
 
#define ADV7180_ICR3_ADI   0x4B
 
#define ADV7180_IMR3_ADI   0x4C
 
#define ADV7180_IMR4_ADI   0x50
 
#define ADV7180_NTSC_V_BIT_END_REG   0xE6
 
#define ADV7180_NTSC_V_BIT_END_MANUAL_NVEND   0x4F
 
#define to_adv7180_sd(_ctrl)
 

Functions

 MODULE_DEVICE_TABLE (i2c, adv7180_id)
 
 module_i2c_driver (adv7180_driver)
 
 MODULE_DESCRIPTION ("Analog Devices ADV7180 video decoder driver")
 
 MODULE_AUTHOR ("Mocean Laboratories")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define ADV7180_ADI_CTRL_IRQ_SPACE   0x20

Definition at line 74 of file adv7180.c.

#define ADV7180_ADI_CTRL_REG   0x0e

Definition at line 73 of file adv7180.c.

#define ADV7180_AUTODETECT_DEFAULT   0x7f

Definition at line 56 of file adv7180.c.

#define ADV7180_AUTODETECT_ENABLE_REG   0x07

Definition at line 55 of file adv7180.c.

#define ADV7180_BRI_DEF   0

Definition at line 65 of file adv7180.c.

#define ADV7180_BRI_MAX   127

Definition at line 66 of file adv7180.c.

#define ADV7180_BRI_MIN   -128

Definition at line 64 of file adv7180.c.

#define ADV7180_BRI_REG   0x0a /*Signed */

Definition at line 63 of file adv7180.c.

#define ADV7180_CON_DEF   128

Definition at line 60 of file adv7180.c.

#define ADV7180_CON_MAX   255

Definition at line 61 of file adv7180.c.

#define ADV7180_CON_MIN   0

Definition at line 59 of file adv7180.c.

#define ADV7180_CON_REG   0x08 /*Unsigned */

Definition at line 58 of file adv7180.c.

#define ADV7180_EXTENDED_OUTPUT_CONTROL_NTSCDIS   0xC5

Definition at line 53 of file adv7180.c.

#define ADV7180_EXTENDED_OUTPUT_CONTROL_REG   0x04

Definition at line 52 of file adv7180.c.

#define ADV7180_HUE_DEF   0

Definition at line 70 of file adv7180.c.

#define ADV7180_HUE_MAX   128

Definition at line 71 of file adv7180.c.

#define ADV7180_HUE_MIN   -127

Definition at line 69 of file adv7180.c.

#define ADV7180_HUE_REG   0x0b /*Signed, inverted */

Definition at line 68 of file adv7180.c.

#define ADV7180_ICONF1_ACTIVE_LOW   0x01

Definition at line 97 of file adv7180.c.

#define ADV7180_ICONF1_ACTIVE_TO_CLR   0xC0

Definition at line 99 of file adv7180.c.

#define ADV7180_ICONF1_ADI   0x40

Definition at line 96 of file adv7180.c.

#define ADV7180_ICONF1_PSYNC_ONLY   0x10

Definition at line 98 of file adv7180.c.

#define ADV7180_ICR1_ADI   0x43

Definition at line 110 of file adv7180.c.

#define ADV7180_ICR3_ADI   0x4B

Definition at line 115 of file adv7180.c.

#define ADV7180_ID_7180   0x18

Definition at line 94 of file adv7180.c.

#define ADV7180_IDENT_REG   0x11

Definition at line 93 of file adv7180.c.

#define ADV7180_IMR1_ADI   0x44

Definition at line 111 of file adv7180.c.

#define ADV7180_IMR2_ADI   0x48

Definition at line 112 of file adv7180.c.

#define ADV7180_IMR3_ADI   0x4C

Definition at line 116 of file adv7180.c.

#define ADV7180_IMR4_ADI   0x50

Definition at line 117 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_AD_PAL_BG_NTSC_J_SECAM   0x00

Definition at line 34 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_AD_PAL_BG_NTSC_J_SECAM_PED   0x10

Definition at line 35 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_AD_PAL_N_NTSC_J_SECAM   0x20

Definition at line 36 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_AD_PAL_N_NTSC_M_SECAM   0x30

Definition at line 37 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_INSEL_MASK   0x0f

Definition at line 50 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_NTSC_443   0x70

Definition at line 41 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_NTSC_J   0x40

Definition at line 38 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_NTSC_M   0x50

Definition at line 39 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL60   0x60

Definition at line 40 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_BG   0x80

Definition at line 42 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_COMB_N   0xc0

Definition at line 46 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_COMB_N_PED   0xd0

Definition at line 47 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_M   0xa0

Definition at line 44 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_M_PED   0xb0

Definition at line 45 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_N   0x90

Definition at line 43 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_SECAM   0xe0

Definition at line 48 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_PAL_SECAM_PED   0xf0

Definition at line 49 of file adv7180.c.

#define ADV7180_INPUT_CONTROL_REG   0x00

Definition at line 33 of file adv7180.c.

#define ADV7180_IRQ1_LOCK   0x01

Definition at line 107 of file adv7180.c.

#define ADV7180_IRQ1_UNLOCK   0x02

Definition at line 108 of file adv7180.c.

#define ADV7180_IRQ3_AD_CHANGE   0x08

Definition at line 113 of file adv7180.c.

#define ADV7180_ISR1_ADI   0x42

Definition at line 109 of file adv7180.c.

#define ADV7180_ISR3_ADI   0x4A

Definition at line 114 of file adv7180.c.

#define ADV7180_NTSC_V_BIT_END_MANUAL_NVEND   0x4F

Definition at line 120 of file adv7180.c.

#define ADV7180_NTSC_V_BIT_END_REG   0xE6

Definition at line 119 of file adv7180.c.

#define ADV7180_PWR_MAN_OFF   0x24

Definition at line 78 of file adv7180.c.

#define ADV7180_PWR_MAN_ON   0x04

Definition at line 77 of file adv7180.c.

#define ADV7180_PWR_MAN_REG   0x0f

Definition at line 76 of file adv7180.c.

#define ADV7180_PWR_MAN_RES   0x80

Definition at line 79 of file adv7180.c.

#define ADV7180_SAT_DEF   128

Definition at line 104 of file adv7180.c.

#define ADV7180_SAT_MAX   255

Definition at line 105 of file adv7180.c.

#define ADV7180_SAT_MIN   0

Definition at line 103 of file adv7180.c.

#define ADV7180_SD_SAT_CB_REG   0xe3 /*Unsigned */

Definition at line 101 of file adv7180.c.

#define ADV7180_SD_SAT_CR_REG   0xe4 /*Unsigned */

Definition at line 102 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_MASK   0x70

Definition at line 83 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_NTSC_4_43   0x10

Definition at line 85 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_NTSM_M_J   0x00

Definition at line 84 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_PAL_60   0x30

Definition at line 87 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_PAL_B_G   0x40

Definition at line 88 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_PAL_COMB   0x60

Definition at line 90 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_PAL_M   0x20

Definition at line 86 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_SECAM   0x50

Definition at line 89 of file adv7180.c.

#define ADV7180_STATUS1_AUTOD_SECAM_525   0x70

Definition at line 91 of file adv7180.c.

#define ADV7180_STATUS1_IN_LOCK   0x01

Definition at line 82 of file adv7180.c.

#define ADV7180_STATUS1_REG   0x10

Definition at line 81 of file adv7180.c.

#define to_adv7180_sd (   _ctrl)
Value:
(&container_of(_ctrl->handler, \
struct adv7180_state, \
ctrl_hdl)->sd)

Definition at line 132 of file adv7180.c.

Function Documentation

MODULE_AUTHOR ( "Mocean Laboratories"  )
MODULE_DESCRIPTION ( "Analog Devices ADV7180 video decoder driver )
MODULE_DEVICE_TABLE ( i2c  ,
adv7180_id   
)
module_i2c_driver ( adv7180_driver  )
MODULE_LICENSE ( "GPL v2 )