diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-11-27 20:01:23 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:42:19 -0500 |
commit | ef53a1159dfcdc1fecf5adb5b8d26803f194c09b (patch) | |
tree | 34e477e3db2a69c6cfa6607933f552c2c89d952b /include | |
parent | 4e89217b943cfb26f88f04920d44f2077931f0e7 (diff) |
V4L/DVB (13532): ir-common: Add infrastructure to use a dynamic keycode table
V4L drivers use an static keycode vector with 128 entries, where the scancode
indexes the keycode. While this works, it limits the scancodes to have only
7 bits, not allowing for example full RC5 codes.
Instead of implementing the same code on every V4L driver, provide a common
infrastructure to handle the bigger tables, minimizing the changes inside
each driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/ir-common.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 5964145d65e6..805f1e09770f 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -106,6 +106,8 @@ struct card_ir { | |||
106 | struct tasklet_struct tlet; | 106 | struct tasklet_struct tlet; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | /* Routines from ir-functions.c */ | ||
110 | |||
109 | void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, | 111 | void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, |
110 | int ir_type, struct ir_scancode_table *ir_codes); | 112 | int ir_type, struct ir_scancode_table *ir_codes); |
111 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); | 113 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); |
@@ -120,7 +122,15 @@ u32 ir_rc5_decode(unsigned int code); | |||
120 | void ir_rc5_timer_end(unsigned long data); | 122 | void ir_rc5_timer_end(unsigned long data); |
121 | void ir_rc5_timer_keyup(unsigned long data); | 123 | void ir_rc5_timer_keyup(unsigned long data); |
122 | 124 | ||
123 | /* Keymaps to be used by other modules */ | 125 | /* Routines from ir-keytable.c */ |
126 | |||
127 | u32 ir_g_keycode_from_table(struct input_dev *input_dev, | ||
128 | u32 scancode); | ||
129 | |||
130 | int ir_set_keycode_table(struct input_dev *input_dev, | ||
131 | struct ir_scancode_table *rc_tab); | ||
132 | |||
133 | /* scancode->keycode map tables from ir-keymaps.c */ | ||
124 | 134 | ||
125 | extern struct ir_scancode_table ir_codes_empty_table; | 135 | extern struct ir_scancode_table ir_codes_empty_table; |
126 | extern struct ir_scancode_table ir_codes_avermedia_table; | 136 | extern struct ir_scancode_table ir_codes_avermedia_table; |