diff options
Diffstat (limited to 'drivers/media/video/bttv.h')
| -rw-r--r-- | drivers/media/video/bttv.h | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/drivers/media/video/bttv.h b/drivers/media/video/bttv.h index 93298f06e019..9feaa6bab207 100644 --- a/drivers/media/video/bttv.h +++ b/drivers/media/video/bttv.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/videodev.h> | 17 | #include <linux/videodev.h> |
| 18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
| 19 | #include <media/ir-common.h> | ||
| 20 | #include <media/ir-kbd-i2c.h> | ||
| 19 | 21 | ||
| 20 | /* ---------------------------------------------------------- */ | 22 | /* ---------------------------------------------------------- */ |
| 21 | /* exported by bttv-cards.c */ | 23 | /* exported by bttv-cards.c */ |
| @@ -163,6 +165,7 @@ | |||
| 163 | #define BTTV_BOARD_OSPREY440 0x8c | 165 | #define BTTV_BOARD_OSPREY440 0x8c |
| 164 | #define BTTV_BOARD_ASOUND_SKYEYE 0x8d | 166 | #define BTTV_BOARD_ASOUND_SKYEYE 0x8d |
| 165 | #define BTTV_BOARD_SABRENT_TVFM 0x8e | 167 | #define BTTV_BOARD_SABRENT_TVFM 0x8e |
| 168 | #define BTTV_BOARD_HAUPPAUGE_IMPACTVCB 0x8f | ||
| 166 | 169 | ||
| 167 | /* i2c address list */ | 170 | /* i2c address list */ |
| 168 | #define I2C_TSA5522 0xc2 | 171 | #define I2C_TSA5522 0xc2 |
| @@ -210,6 +213,34 @@ struct bttv_core { | |||
| 210 | 213 | ||
| 211 | struct bttv; | 214 | struct bttv; |
| 212 | 215 | ||
| 216 | |||
| 217 | struct bttv_ir { | ||
| 218 | struct input_dev *dev; | ||
| 219 | struct ir_input_state ir; | ||
| 220 | char name[32]; | ||
| 221 | char phys[32]; | ||
| 222 | |||
| 223 | /* Usual gpio signalling */ | ||
| 224 | |||
| 225 | u32 mask_keycode; | ||
| 226 | u32 mask_keydown; | ||
| 227 | u32 mask_keyup; | ||
| 228 | u32 polling; | ||
| 229 | u32 last_gpio; | ||
| 230 | struct work_struct work; | ||
| 231 | struct timer_list timer; | ||
| 232 | |||
| 233 | /* RC5 gpio */ | ||
| 234 | u32 rc5_gpio; | ||
| 235 | struct timer_list timer_end; /* timer_end for code completion */ | ||
| 236 | struct timer_list timer_keyup; /* timer_end for key release */ | ||
| 237 | u32 last_rc5; /* last good rc5 code */ | ||
| 238 | u32 last_bit; /* last raw bit seen */ | ||
| 239 | u32 code; /* raw code under construction */ | ||
| 240 | struct timeval base_time; /* time of last seen code */ | ||
| 241 | int active; /* building raw code */ | ||
| 242 | }; | ||
| 243 | |||
| 213 | struct tvcard | 244 | struct tvcard |
| 214 | { | 245 | { |
| 215 | char *name; | 246 | char *name; |
| @@ -235,7 +266,6 @@ struct tvcard | |||
| 235 | unsigned int has_dvb:1; | 266 | unsigned int has_dvb:1; |
| 236 | unsigned int has_remote:1; | 267 | unsigned int has_remote:1; |
| 237 | unsigned int no_gpioirq:1; | 268 | unsigned int no_gpioirq:1; |
| 238 | unsigned int any_irq:1; | ||
| 239 | 269 | ||
| 240 | /* other settings */ | 270 | /* other settings */ |
| 241 | unsigned int pll; | 271 | unsigned int pll; |
| @@ -335,7 +365,6 @@ struct bttv_sub_driver { | |||
| 335 | struct device_driver drv; | 365 | struct device_driver drv; |
| 336 | char wanted[BUS_ID_SIZE]; | 366 | char wanted[BUS_ID_SIZE]; |
| 337 | void (*gpio_irq)(struct bttv_sub_device *sub); | 367 | void (*gpio_irq)(struct bttv_sub_device *sub); |
| 338 | int (*any_irq)(struct bttv_sub_device *sub); | ||
| 339 | }; | 368 | }; |
| 340 | #define to_bttv_sub_drv(x) container_of((x), struct bttv_sub_driver, drv) | 369 | #define to_bttv_sub_drv(x) container_of((x), struct bttv_sub_driver, drv) |
| 341 | 370 | ||
| @@ -363,6 +392,10 @@ extern int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1, | |||
| 363 | unsigned char b2, int both); | 392 | unsigned char b2, int both); |
| 364 | extern void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr); | 393 | extern void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr); |
| 365 | 394 | ||
| 395 | extern int bttv_input_init(struct bttv *dev); | ||
| 396 | extern void bttv_input_fini(struct bttv *dev); | ||
| 397 | extern void bttv_input_irq(struct bttv *dev); | ||
| 398 | |||
| 366 | #endif /* _BTTV_H_ */ | 399 | #endif /* _BTTV_H_ */ |
| 367 | /* | 400 | /* |
| 368 | * Local variables: | 401 | * Local variables: |
