aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88.h')
-rw-r--r--drivers/media/video/cx88/cx88.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 3bc91aad4fe5..7054e941f1d7 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -74,6 +74,11 @@ enum cx88_board_type {
74 CX88_MPEG_BLACKBIRD 74 CX88_MPEG_BLACKBIRD
75}; 75};
76 76
77enum cx8802_board_access {
78 CX8802_DRVCTL_SHARED = 1,
79 CX8802_DRVCTL_EXCLUSIVE = 2,
80};
81
77/* ----------------------------------------------------------- */ 82/* ----------------------------------------------------------- */
78/* tv norms */ 83/* tv norms */
79 84
@@ -220,6 +225,7 @@ struct cx88_input {
220 enum cx88_itype type; 225 enum cx88_itype type;
221 unsigned int vmux; 226 unsigned int vmux;
222 u32 gpio0, gpio1, gpio2, gpio3; 227 u32 gpio0, gpio1, gpio2, gpio3;
228 unsigned int extadc:1;
223}; 229};
224 230
225struct cx88_board { 231struct cx88_board {
@@ -330,6 +336,7 @@ struct cx88_core {
330 336
331 /* cx88-video needs to access cx8802 for hybrid tuner pll access. */ 337 /* cx88-video needs to access cx8802 for hybrid tuner pll access. */
332 struct cx8802_dev *dvbdev; 338 struct cx8802_dev *dvbdev;
339 enum cx88_board_type active_type_id;
333}; 340};
334 341
335struct cx8800_dev; 342struct cx8800_dev;
@@ -405,6 +412,31 @@ struct cx8802_suspend_state {
405 int disabled; 412 int disabled;
406}; 413};
407 414
415struct cx8802_driver {
416 struct cx88_core *core;
417 struct list_head devlist;
418
419 /* Type of driver and access required */
420 enum cx88_board_type type_id;
421 enum cx8802_board_access hw_access;
422
423 /* MPEG 8802 internal only */
424 int (*suspend)(struct pci_dev *pci_dev, pm_message_t state);
425 int (*resume)(struct pci_dev *pci_dev);
426
427 /* MPEG 8802 -> mini driver - Driver probe and configuration */
428 int (*probe)(struct cx8802_driver *drv);
429 int (*remove)(struct cx8802_driver *drv);
430
431 /* MPEG 8802 -> mini driver - Access for hardware control */
432 int (*advise_acquire)(struct cx8802_driver *drv);
433 int (*advise_release)(struct cx8802_driver *drv);
434
435 /* MPEG 8802 <- mini driver - Access for hardware control */
436 int (*request_acquire)(struct cx8802_driver *drv);
437 int (*request_release)(struct cx8802_driver *drv);
438};
439
408struct cx8802_dev { 440struct cx8802_dev {
409 struct cx88_core *core; 441 struct cx88_core *core;
410 spinlock_t slock; 442 spinlock_t slock;
@@ -439,6 +471,9 @@ struct cx8802_dev {
439 471
440 /* mpeg params */ 472 /* mpeg params */
441 struct cx2341x_mpeg_params params; 473 struct cx2341x_mpeg_params params;
474
475 /* List of attached drivers */
476 struct cx8802_driver drvlist;
442}; 477};
443 478
444/* ----------------------------------------------------------- */ 479/* ----------------------------------------------------------- */
@@ -571,6 +606,11 @@ void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t);
571void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual); 606void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual);
572int cx88_audio_thread(void *data); 607int cx88_audio_thread(void *data);
573 608
609int cx8802_register_driver(struct cx8802_driver *drv);
610int cx8802_unregister_driver(struct cx8802_driver *drv);
611struct cx8802_dev * cx8802_get_device(struct inode *inode);
612struct cx8802_driver * cx8802_get_driver(struct cx8802_dev *dev, enum cx88_board_type btype);
613
574/* ----------------------------------------------------------- */ 614/* ----------------------------------------------------------- */
575/* cx88-input.c */ 615/* cx88-input.c */
576 616
@@ -600,6 +640,13 @@ extern int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
600extern const u32 cx88_user_ctrls[]; 640extern const u32 cx88_user_ctrls[];
601extern int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl); 641extern int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl);
602 642
643/* ----------------------------------------------------------- */
644/* cx88-blackbird.c */
645/* used by cx88-ivtv ioctl emulation layer */
646extern int (*cx88_ioctl_hook)(struct inode *inode, struct file *file,
647 unsigned int cmd, void *arg);
648extern unsigned int (*cx88_ioctl_translator)(unsigned int cmd);
649
603/* 650/*
604 * Local variables: 651 * Local variables:
605 * c-basic-offset: 8 652 * c-basic-offset: 8