diff options
author | Ricardo Cerqueira <v4l@cerqueira.org> | 2006-01-09 15:25:25 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 15:25:25 -0200 |
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 @@ #include <linux/videodev.h> #include <linux/i2c.h> +#include <media/ir-common.h> +#include <media/ir-kbd-i2c.h> /* ---------------------------------------------------------- */ /* exported by bttv-cards.c */ @@ -211,6 +213,34 @@ struct bttv_core { struct bttv; + +struct bttv_ir { + struct input_dev *dev; + struct ir_input_state ir; + char name[32]; + char phys[32]; + + /* Usual gpio signalling */ + + u32 mask_keycode; + u32 mask_keydown; + u32 mask_keyup; + u32 polling; + u32 last_gpio; + struct work_struct work; + struct timer_list timer; + + /* RC5 gpio */ + u32 rc5_gpio; + struct timer_list timer_end; /* timer_end for code completion */ + struct timer_list timer_keyup; /* timer_end for key release */ + u32 last_rc5; /* last good rc5 code */ + u32 last_bit; /* last raw bit seen */ + u32 code; /* raw code under construction */ + struct timeval base_time; /* time of last seen code */ + int active; /* building raw code */ +}; + struct tvcard { char *name; @@ -236,7 +266,6 @@ struct tvcard unsigned int has_dvb:1; unsigned int has_remote:1; unsigned int no_gpioirq:1; - unsigned int any_irq:1; /* other settings */ unsigned int pll; @@ -336,7 +365,6 @@ struct bttv_sub_driver { struct device_driver drv; char wanted[BUS_ID_SIZE]; void (*gpio_irq)(struct bttv_sub_device *sub); - int (*any_irq)(struct bttv_sub_device *sub); }; #define to_bttv_sub_drv(x) container_of((x), struct bttv_sub_driver, drv) @@ -364,6 +392,10 @@ extern int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1, unsigned char b2, int both); extern void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr); +extern int bttv_input_init(struct bttv *dev); +extern void bttv_input_fini(struct bttv *dev); +extern void bttv_input_irq(struct bttv *dev); + #endif /* _BTTV_H_ */ /* * Local variables: |