aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/rc-map.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-04 11:38:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:56:58 -0400
commit4f9256b496677adf799342cee7d406dd46e566d9 (patch)
treef54b3c2ed3c5041f1110059bf86c0ba547a7a50d /include/media/rc-map.h
parent587835a4b0ada7d78c4f3300e3ab26b7b2495705 (diff)
V4L/DVB: ir-core: move rc map code to rc-map.h
The keymaps don't need to be recompiled every time a change at ir-core.h happens, since it only depends on rc-map defines. By moving those definitions to the proper header, the code became cleaner, and avoids needing to recompile all the RC maps every time a non-related change is introduced. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/rc-map.h')
-rw-r--r--include/media/rc-map.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index 9ea0033fa3cc..b10990d1749d 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -9,7 +9,42 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <media/ir-core.h> 12#include <linux/input.h>
13
14#define IR_TYPE_UNKNOWN 0
15#define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */
16#define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */
17#define IR_TYPE_NEC (1 << 2)
18#define IR_TYPE_OTHER (1u << 31)
19
20struct ir_scancode {
21 u16 scancode;
22 u32 keycode;
23};
24
25struct ir_scancode_table {
26 struct ir_scancode *scan;
27 unsigned int size; /* Max number of entries */
28 unsigned int len; /* Used number of entries */
29 unsigned int alloc; /* Size of *scan in bytes */
30 u64 ir_type;
31 char *name;
32 spinlock_t lock;
33};
34
35struct rc_keymap {
36 struct list_head list;
37 struct ir_scancode_table map;
38};
39
40/* Routines from rc-map.c */
41
42int ir_register_map(struct rc_keymap *map);
43void ir_unregister_map(struct rc_keymap *map);
44struct ir_scancode_table *get_rc_map(const char *name);
45void rc_map_init(void);
46
47/* Names of the several keytables defined in-kernel */
13 48
14#define RC_MAP_ADSTECH_DVB_T_PCI "rc-adstech-dvb-t-pci" 49#define RC_MAP_ADSTECH_DVB_T_PCI "rc-adstech-dvb-t-pci"
15#define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp" 50#define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp"