diff options
author | Ricardo Cerqueira <v4l@cerqueira.org> | 2006-01-09 12:25:25 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 12:25:25 -0500 |
commit | 4abdfed5676e5ef7f2461bb76f5929068a9cc9cf (patch) | |
tree | ff4e3e80f57f788a9cf450966f137c44b58ff1b2 /drivers/media/video/bttv.h | |
parent | e0b2d7a89bb250fb0c9068c4481c9fd26c3fb227 (diff) |
V4L/DVB (3161): ir-kbd-gpio is now part of bttv
- Merged ir-kbd-gpio into bttv as bttv-input, for consistency with other
input modules
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/bttv.h')
-rw-r--r-- | drivers/media/video/bttv.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/media/video/bttv.h b/drivers/media/video/bttv.h index a5f172fe9f98..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 */ |
@@ -211,6 +213,34 @@ struct bttv_core { | |||
211 | 213 | ||
212 | struct bttv; | 214 | struct bttv; |
213 | 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 | |||
214 | struct tvcard | 244 | struct tvcard |
215 | { | 245 | { |
216 | char *name; | 246 | char *name; |
@@ -236,7 +266,6 @@ struct tvcard | |||
236 | unsigned int has_dvb:1; | 266 | unsigned int has_dvb:1; |
237 | unsigned int has_remote:1; | 267 | unsigned int has_remote:1; |
238 | unsigned int no_gpioirq:1; | 268 | unsigned int no_gpioirq:1; |
239 | unsigned int any_irq:1; | ||
240 | 269 | ||
241 | /* other settings */ | 270 | /* other settings */ |
242 | unsigned int pll; | 271 | unsigned int pll; |
@@ -336,7 +365,6 @@ struct bttv_sub_driver { | |||
336 | struct device_driver drv; | 365 | struct device_driver drv; |
337 | char wanted[BUS_ID_SIZE]; | 366 | char wanted[BUS_ID_SIZE]; |
338 | void (*gpio_irq)(struct bttv_sub_device *sub); | 367 | void (*gpio_irq)(struct bttv_sub_device *sub); |
339 | int (*any_irq)(struct bttv_sub_device *sub); | ||
340 | }; | 368 | }; |
341 | #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) |
342 | 370 | ||
@@ -364,6 +392,10 @@ extern int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1, | |||
364 | unsigned char b2, int both); | 392 | unsigned char b2, int both); |
365 | 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); |
366 | 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 | |||
367 | #endif /* _BTTV_H_ */ | 399 | #endif /* _BTTV_H_ */ |
368 | /* | 400 | /* |
369 | * Local variables: | 401 | * Local variables: |