aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/ir-common.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-12-11 06:34:07 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:18:42 -0500
commit446e4a64d2f6efddc63a47169ba3c8037b620307 (patch)
tree3b14d76f7e93d5b35de50edf85a9179f759adb3d /include/media/ir-common.h
parente27d38112eb727df189a9ebf560aa104cb102253 (diff)
V4L/DVB (13613): IR: create ir-core module
Split the ir-common into two separate modules: - ir-core: it is the IR-independent functions; - ir-common: has the common part used by V4L drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/ir-common.h')
-rw-r--r--include/media/ir-common.h39
1 files changed, 1 insertions, 38 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 45bf5cf59458..18d300414fa2 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -26,31 +26,7 @@
26#include <linux/input.h> 26#include <linux/input.h>
27#include <linux/workqueue.h> 27#include <linux/workqueue.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/spinlock.h> 29#include <media/ir-core.h>
30
31extern int media_ir_debug; /* media_ir_debug level (0,1,2) */
32#define IR_dprintk(level, fmt, arg...) if (media_ir_debug >= level) \
33 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)
34
35enum ir_type {
36 IR_TYPE_UNKNOWN = 0,
37 IR_TYPE_RC5 = 1,
38 IR_TYPE_PD = 2, /* Pulse distance encoded IR */
39 IR_TYPE_NEC = 3,
40 IR_TYPE_OTHER = 99,
41};
42
43struct ir_scancode {
44 u16 scancode;
45 u32 keycode;
46};
47
48struct ir_scancode_table {
49 struct ir_scancode *scan;
50 int size;
51 enum ir_type ir_type;
52 spinlock_t lock;
53};
54 30
55#define RC5_START(x) (((x)>>12)&3) 31#define RC5_START(x) (((x)>>12)&3)
56#define RC5_TOGGLE(x) (((x)>>11)&1) 32#define RC5_TOGGLE(x) (((x)>>11)&1)
@@ -123,19 +99,6 @@ u32 ir_rc5_decode(unsigned int code);
123void ir_rc5_timer_end(unsigned long data); 99void ir_rc5_timer_end(unsigned long data);
124void ir_rc5_timer_keyup(unsigned long data); 100void ir_rc5_timer_keyup(unsigned long data);
125 101
126/* Routines from ir-keytable.c */
127
128u32 ir_g_keycode_from_table(struct input_dev *input_dev,
129 u32 scancode);
130
131int ir_set_keycode_table(struct input_dev *input_dev,
132 struct ir_scancode_table *rc_tab);
133
134int ir_roundup_tablesize(int n_elems);
135int ir_copy_table(struct ir_scancode_table *destin,
136 const struct ir_scancode_table *origin);
137void ir_input_free(struct input_dev *input_dev);
138
139/* scancode->keycode map tables from ir-keymaps.c */ 102/* scancode->keycode map tables from ir-keymaps.c */
140 103
141extern struct ir_scancode_table ir_codes_empty_table; 104extern struct ir_scancode_table ir_codes_empty_table;