aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-13 13:42:17 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:04:55 -0500
commitc8793b035df7b18997d1cf34254064dac166f009 (patch)
tree29765d7aeb6c349c339e62582e9791f08a9f8b5b /drivers/media/video/em28xx/em28xx.h
parent15b9becc68793209a2afd6c580bf71a71fee90a6 (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.h')
-rw-r--r--drivers/media/video/em28xx/em28xx.h46
1 files changed, 14 insertions, 32 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 2ba34e5b4cc2..3ef80d8b566e 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -30,26 +30,6 @@
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31#include <media/ir-kbd-i2c.h> 31#include <media/ir-kbd-i2c.h>
32 32
33/* Boards supported by driver */
34
35#define EM2800_BOARD_UNKNOWN 0
36#define EM2820_BOARD_UNKNOWN 1
37#define EM2820_BOARD_TERRATEC_CINERGY_250 2
38#define EM2820_BOARD_PINNACLE_USB_2 3
39#define EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 4
40#define EM2820_BOARD_MSI_VOX_USB_2 5
41#define EM2800_BOARD_TERRATEC_CINERGY_200 6
42#define EM2800_BOARD_LEADTEK_WINFAST_USBII 7
43#define EM2800_BOARD_KWORLD_USB2800 8
44#define EM2820_BOARD_PINNACLE_DVC_90 9
45#define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 10
46#define EM2880_BOARD_TERRATEC_HYBRID_XS 11
47#define EM2820_BOARD_KWORLD_PVRTV2800RF 12
48#define EM2880_BOARD_TERRATEC_PRODIGY_XS 13
49#define EM2820_BOARD_PROLINK_PLAYTV_USB2 14
50#define EM2800_BOARD_VGEAR_POCKETTV 15
51#define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 16
52
53#define UNSET -1 33#define UNSET -1
54 34
55/* maximum number of em28xx boards */ 35/* maximum number of em28xx boards */
@@ -185,6 +165,7 @@ struct em28xx_board {
185 unsigned int has_msp34xx:1; 165 unsigned int has_msp34xx:1;
186 unsigned int mts_firmware:1; 166 unsigned int mts_firmware:1;
187 unsigned int has_12mhz_i2s:1; 167 unsigned int has_12mhz_i2s:1;
168 unsigned int max_range_640_480:1;
188 169
189 unsigned int analog_gpio; 170 unsigned int analog_gpio;
190 171
@@ -251,6 +232,7 @@ struct em28xx {
251 unsigned int stream_on:1; /* Locks streams */ 232 unsigned int stream_on:1; /* Locks streams */
252 unsigned int has_audio_class:1; 233 unsigned int has_audio_class:1;
253 unsigned int has_12mhz_i2s:1; 234 unsigned int has_12mhz_i2s:1;
235 unsigned int max_range_640_480:1;
254 236
255 int video_inputs; /* number of video inputs */ 237 int video_inputs; /* number of video inputs */
256 struct list_head devlist; 238 struct list_head devlist;
@@ -352,10 +334,6 @@ void em28xx_do_i2c_scan(struct em28xx *dev);
352int em28xx_i2c_register(struct em28xx *dev); 334int em28xx_i2c_register(struct em28xx *dev);
353int em28xx_i2c_unregister(struct em28xx *dev); 335int em28xx_i2c_unregister(struct em28xx *dev);
354 336
355/* Provided by em28xx-input.c */
356
357void em28xx_set_ir(struct em28xx * dev,struct IR_i2c *ir);
358
359/* Provided by em28xx-core.c */ 337/* Provided by em28xx-core.c */
360 338
361u32 em28xx_request_buffers(struct em28xx *dev, u32 count); 339u32 em28xx_request_buffers(struct em28xx *dev, u32 count);
@@ -393,6 +371,14 @@ extern void em28xx_card_setup(struct em28xx *dev);
393extern struct em28xx_board em28xx_boards[]; 371extern struct em28xx_board em28xx_boards[];
394extern struct usb_device_id em28xx_id_table[]; 372extern struct usb_device_id em28xx_id_table[];
395extern const unsigned int em28xx_bcount; 373extern const unsigned int em28xx_bcount;
374void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir);
375
376/* Provided by em28xx-input.c */
377/* TODO: Check if the standard get_key handlers on ir-common can be used */
378int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw);
379int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw);
380int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key,
381 u32 *ir_raw);
396 382
397/* em2800 registers */ 383/* em2800 registers */
398#define EM2800_AUDIOSRC_REG 0x08 384#define EM2800_AUDIOSRC_REG 0x08
@@ -550,21 +536,17 @@ inline static int em28xx_gamma_set(struct em28xx *dev, s32 val)
550/*FIXME: maxw should be dependent of alt mode */ 536/*FIXME: maxw should be dependent of alt mode */
551inline static unsigned int norm_maxw(struct em28xx *dev) 537inline static unsigned int norm_maxw(struct em28xx *dev)
552{ 538{
553 switch (dev->model) { 539 if (dev->max_range_640_480)
554 case EM2820_BOARD_MSI_VOX_USB_2:
555 return 640; 540 return 640;
556 default: 541 else
557 return 720; 542 return 720;
558 }
559} 543}
560 544
561inline static unsigned int norm_maxh(struct em28xx *dev) 545inline static unsigned int norm_maxh(struct em28xx *dev)
562{ 546{
563 switch (dev->model) { 547 if (dev->max_range_640_480)
564 case EM2820_BOARD_MSI_VOX_USB_2:
565 return 480; 548 return 480;
566 default: 549 else
567 return (dev->norm & V4L2_STD_625_50) ? 576 : 480; 550 return (dev->norm & V4L2_STD_625_50) ? 576 : 480;
568 }
569} 551}
570#endif 552#endif