diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-13 13:42:17 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:04:55 -0500 |
commit | c8793b035df7b18997d1cf34254064dac166f009 (patch) | |
tree | 29765d7aeb6c349c339e62582e9791f08a9f8b5b /drivers/media/video/em28xx/em28xx-input.c | |
parent | 15b9becc68793209a2afd6c580bf71a71fee90a6 (diff) |
V4L/DVB (7021): Move all board specific configuration to em28xx-cards.c
This cleanup moves the board-specific configurations to em28xx-cards.c.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-input.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 52 |
1 files changed, 5 insertions, 47 deletions
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index e3894b68c4ee..10da2fd8d987 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c | |||
@@ -30,11 +30,7 @@ | |||
30 | 30 | ||
31 | #include "em28xx.h" | 31 | #include "em28xx.h" |
32 | 32 | ||
33 | static unsigned int disable_ir = 0; | 33 | static unsigned int ir_debug; |
34 | module_param(disable_ir, int, 0444); | ||
35 | MODULE_PARM_DESC(disable_ir,"disable infrared remote support"); | ||
36 | |||
37 | static unsigned int ir_debug = 0; | ||
38 | module_param(ir_debug, int, 0644); | 34 | module_param(ir_debug, int, 0644); |
39 | MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]"); | 35 | MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]"); |
40 | 36 | ||
@@ -43,7 +39,7 @@ MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]"); | |||
43 | 39 | ||
44 | /* ----------------------------------------------------------------------- */ | 40 | /* ----------------------------------------------------------------------- */ |
45 | 41 | ||
46 | static int get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 42 | int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
47 | { | 43 | { |
48 | unsigned char b; | 44 | unsigned char b; |
49 | 45 | ||
@@ -72,7 +68,7 @@ static int get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
72 | } | 68 | } |
73 | 69 | ||
74 | 70 | ||
75 | static int get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 71 | int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
76 | { | 72 | { |
77 | unsigned char buf[2]; | 73 | unsigned char buf[2]; |
78 | unsigned char code; | 74 | unsigned char code; |
@@ -103,7 +99,8 @@ static int get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
103 | return 1; | 99 | return 1; |
104 | } | 100 | } |
105 | 101 | ||
106 | static int get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 102 | int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, |
103 | u32 *ir_raw) | ||
107 | { | 104 | { |
108 | unsigned char buf[3]; | 105 | unsigned char buf[3]; |
109 | 106 | ||
@@ -125,45 +122,6 @@ static int get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw | |||
125 | return 1; | 122 | return 1; |
126 | } | 123 | } |
127 | 124 | ||
128 | /* ----------------------------------------------------------------------- */ | ||
129 | void em28xx_set_ir(struct em28xx * dev,struct IR_i2c *ir) | ||
130 | { | ||
131 | if (disable_ir) { | ||
132 | ir->get_key=NULL; | ||
133 | return ; | ||
134 | } | ||
135 | |||
136 | /* detect & configure */ | ||
137 | switch (dev->model) { | ||
138 | case (EM2800_BOARD_UNKNOWN): | ||
139 | break; | ||
140 | case (EM2820_BOARD_UNKNOWN): | ||
141 | break; | ||
142 | case (EM2800_BOARD_TERRATEC_CINERGY_200): | ||
143 | case (EM2820_BOARD_TERRATEC_CINERGY_250): | ||
144 | ir->ir_codes = ir_codes_em_terratec; | ||
145 | ir->get_key = get_key_terratec; | ||
146 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Terratec)"); | ||
147 | break; | ||
148 | case (EM2820_BOARD_PINNACLE_USB_2): | ||
149 | ir->ir_codes = ir_codes_pinnacle_grey; | ||
150 | ir->get_key = get_key_pinnacle_usb_grey; | ||
151 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Pinnacle PCTV)"); | ||
152 | break; | ||
153 | case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2): | ||
154 | ir->ir_codes = ir_codes_hauppauge_new; | ||
155 | ir->get_key = get_key_em_haup; | ||
156 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM2840 Hauppauge)"); | ||
157 | break; | ||
158 | case (EM2820_BOARD_MSI_VOX_USB_2): | ||
159 | break; | ||
160 | case (EM2800_BOARD_LEADTEK_WINFAST_USBII): | ||
161 | break; | ||
162 | case (EM2800_BOARD_KWORLD_USB2800): | ||
163 | break; | ||
164 | } | ||
165 | } | ||
166 | |||
167 | /* ---------------------------------------------------------------------- | 125 | /* ---------------------------------------------------------------------- |
168 | * Local variables: | 126 | * Local variables: |
169 | * c-basic-offset: 8 | 127 | * c-basic-offset: 8 |