diff options
Diffstat (limited to 'drivers/media/video/bt8xx/bttvp.h')
-rw-r--r-- | drivers/media/video/bt8xx/bttvp.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h index d1e26a448ed2..9b776faf0741 100644 --- a/drivers/media/video/bt8xx/bttvp.h +++ b/drivers/media/video/bt8xx/bttvp.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/device.h> | 41 | #include <linux/device.h> |
42 | #include <media/videobuf-dma-sg.h> | 42 | #include <media/videobuf-dma-sg.h> |
43 | #include <media/tveeprom.h> | 43 | #include <media/tveeprom.h> |
44 | #include <media/ir-common.h> | 44 | #include <media/rc-core.h> |
45 | #include <media/ir-kbd-i2c.h> | 45 | #include <media/ir-kbd-i2c.h> |
46 | 46 | ||
47 | #include "bt848.h" | 47 | #include "bt848.h" |
@@ -120,6 +120,33 @@ struct bttv_format { | |||
120 | int hshift,vshift; /* for planar modes */ | 120 | int hshift,vshift; /* for planar modes */ |
121 | }; | 121 | }; |
122 | 122 | ||
123 | struct bttv_ir { | ||
124 | struct rc_dev *dev; | ||
125 | struct timer_list timer; | ||
126 | |||
127 | char name[32]; | ||
128 | char phys[32]; | ||
129 | |||
130 | /* Usual gpio signalling */ | ||
131 | u32 mask_keycode; | ||
132 | u32 mask_keydown; | ||
133 | u32 mask_keyup; | ||
134 | u32 polling; | ||
135 | u32 last_gpio; | ||
136 | int shift_by; | ||
137 | int start; // What should RC5_START() be | ||
138 | int addr; // What RC5_ADDR() should be. | ||
139 | int rc5_remote_gap; | ||
140 | |||
141 | /* RC5 gpio */ | ||
142 | bool rc5_gpio; /* Is RC5 legacy GPIO enabled? */ | ||
143 | u32 last_bit; /* last raw bit seen */ | ||
144 | u32 code; /* raw code under construction */ | ||
145 | struct timeval base_time; /* time of last seen code */ | ||
146 | bool active; /* building raw code */ | ||
147 | }; | ||
148 | |||
149 | |||
123 | /* ---------------------------------------------------------- */ | 150 | /* ---------------------------------------------------------- */ |
124 | 151 | ||
125 | struct bttv_geometry { | 152 | struct bttv_geometry { |
@@ -305,7 +332,6 @@ struct bttv_pll_info { | |||
305 | /* for gpio-connected remote control */ | 332 | /* for gpio-connected remote control */ |
306 | struct bttv_input { | 333 | struct bttv_input { |
307 | struct input_dev *dev; | 334 | struct input_dev *dev; |
308 | struct ir_input_state ir; | ||
309 | char name[32]; | 335 | char name[32]; |
310 | char phys[32]; | 336 | char phys[32]; |
311 | u32 mask_keycode; | 337 | u32 mask_keycode; |
@@ -338,12 +364,10 @@ struct bttv { | |||
338 | struct bttv_pll_info pll; | 364 | struct bttv_pll_info pll; |
339 | int triton1; | 365 | int triton1; |
340 | int gpioirq; | 366 | int gpioirq; |
341 | int (*custom_irq)(struct bttv *btv); | ||
342 | 367 | ||
343 | int use_i2c_hw; | 368 | int use_i2c_hw; |
344 | 369 | ||
345 | /* old gpio interface */ | 370 | /* old gpio interface */ |
346 | wait_queue_head_t gpioq; | ||
347 | int shutdown; | 371 | int shutdown; |
348 | 372 | ||
349 | void (*volume_gpio)(struct bttv *btv, __u16 volume); | 373 | void (*volume_gpio)(struct bttv *btv, __u16 volume); |
@@ -368,7 +392,7 @@ struct bttv { | |||
368 | 392 | ||
369 | /* infrared remote */ | 393 | /* infrared remote */ |
370 | int has_remote; | 394 | int has_remote; |
371 | struct card_ir *remote; | 395 | struct bttv_ir *remote; |
372 | 396 | ||
373 | /* I2C remote data */ | 397 | /* I2C remote data */ |
374 | struct IR_i2c_init_data init_data; | 398 | struct IR_i2c_init_data init_data; |