diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-04-04 15:38:57 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 15:56:58 (GMT) |
commit | 4f9256b496677adf799342cee7d406dd46e566d9 (patch) | |
tree | f54b3c2ed3c5041f1110059bf86c0ba547a7a50d /include/media/rc-map.h | |
parent | 587835a4b0ada7d78c4f3300e3ab26b7b2495705 (diff) | |
download | linux-4f9256b496677adf799342cee7d406dd46e566d9.tar.xz |
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.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 9ea0033..b10990d 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -9,7 +9,42 @@ * (at your option) any later version. */ -#include <media/ir-core.h> +#include <linux/input.h> + +#define IR_TYPE_UNKNOWN 0 +#define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */ +#define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */ +#define IR_TYPE_NEC (1 << 2) +#define IR_TYPE_OTHER (1u << 31) + +struct ir_scancode { + u16 scancode; + u32 keycode; +}; + +struct ir_scancode_table { + struct ir_scancode *scan; + unsigned int size; /* Max number of entries */ + unsigned int len; /* Used number of entries */ + unsigned int alloc; /* Size of *scan in bytes */ + u64 ir_type; + char *name; + spinlock_t lock; +}; + +struct rc_keymap { + struct list_head list; + struct ir_scancode_table map; +}; + +/* Routines from rc-map.c */ + +int ir_register_map(struct rc_keymap *map); +void ir_unregister_map(struct rc_keymap *map); +struct ir_scancode_table *get_rc_map(const char *name); +void rc_map_init(void); + +/* Names of the several keytables defined in-kernel */ #define RC_MAP_ADSTECH_DVB_T_PCI "rc-adstech-dvb-t-pci" #define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp" |