V4L/DVB (12366): ir-kbd-i2c: Allow use of ir-kdb-i2c internal get_key funcs and set...
[safe/jmp/linux-2.6] / include / media / ir-kbd-i2c.h
1 #ifndef _IR_I2C
2 #define _IR_I2C
3
4 #include <media/ir-common.h>
5
6 struct IR_i2c;
7
8 struct IR_i2c {
9         IR_KEYTAB_TYPE         *ir_codes;
10         struct i2c_client      *c;
11         struct input_dev       *input;
12         struct ir_input_state  ir;
13
14         /* Used to avoid fast repeating */
15         unsigned char          old;
16
17         struct delayed_work    work;
18         char                   name[32];
19         char                   phys[32];
20         int                    (*get_key)(struct IR_i2c*, u32*, u32*);
21 };
22
23 enum ir_kbd_get_key_fn {
24         IR_KBD_GET_KEY_CUSTOM = 0,
25         IR_KBD_GET_KEY_PIXELVIEW,
26         IR_KBD_GET_KEY_PV951,
27         IR_KBD_GET_KEY_HAUP,
28         IR_KBD_GET_KEY_KNC1,
29         IR_KBD_GET_KEY_FUSIONHDTV,
30         IR_KBD_GET_KEY_HAUP_XVR,
31         IR_KBD_GET_KEY_AVERMEDIA_CARDBUS,
32 };
33
34 /* Can be passed when instantiating an ir_video i2c device */
35 struct IR_i2c_init_data {
36         IR_KEYTAB_TYPE         *ir_codes;
37         const char             *name;
38         int                    type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */
39         /*
40          * Specify either a function pointer or a value indicating one of
41          * ir_kbd_i2c's internal get_key functions
42          */
43         int                    (*get_key)(struct IR_i2c*, u32*, u32*);
44         enum ir_kbd_get_key_fn internal_get_key_func;
45 };
46 #endif