aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/ir-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/ir-common.h')
-rw-r--r--include/media/ir-common.h39
1 files changed, 3 insertions, 36 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index e41a99ee353e..2c6af24b905e 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -26,26 +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
35#define IR_TYPE_RC5 1
36#define IR_TYPE_PD 2 /* Pulse distance encoded IR */
37#define IR_TYPE_OTHER 99
38
39struct ir_scancode {
40 u16 scancode;
41 u32 keycode;
42};
43
44struct ir_scancode_table {
45 struct ir_scancode *scan;
46 int size;
47 spinlock_t lock;
48};
49 30
50#define RC5_START(x) (((x)>>12)&3) 31#define RC5_START(x) (((x)>>12)&3)
51#define RC5_TOGGLE(x) (((x)>>11)&1) 32#define RC5_TOGGLE(x) (((x)>>11)&1)
@@ -56,8 +37,6 @@ struct ir_input_state {
56 /* configuration */ 37 /* configuration */
57 int ir_type; 38 int ir_type;
58 39
59 struct ir_scancode_table keytable;
60
61 /* key info */ 40 /* key info */
62 u32 ir_key; /* ir scancode */ 41 u32 ir_key; /* ir scancode */
63 u32 keycode; /* linux key code */ 42 u32 keycode; /* linux key code */
@@ -105,7 +84,7 @@ struct card_ir {
105/* Routines from ir-functions.c */ 84/* Routines from ir-functions.c */
106 85
107int ir_input_init(struct input_dev *dev, struct ir_input_state *ir, 86int ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
108 int ir_type, struct ir_scancode_table *ir_codes); 87 int ir_type);
109void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); 88void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
110void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, 89void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
111 u32 ir_key); 90 u32 ir_key);
@@ -118,19 +97,6 @@ u32 ir_rc5_decode(unsigned int code);
118void ir_rc5_timer_end(unsigned long data); 97void ir_rc5_timer_end(unsigned long data);
119void ir_rc5_timer_keyup(unsigned long data); 98void ir_rc5_timer_keyup(unsigned long data);
120 99
121/* Routines from ir-keytable.c */
122
123u32 ir_g_keycode_from_table(struct input_dev *input_dev,
124 u32 scancode);
125
126int ir_set_keycode_table(struct input_dev *input_dev,
127 struct ir_scancode_table *rc_tab);
128
129int ir_roundup_tablesize(int n_elems);
130int ir_copy_table(struct ir_scancode_table *destin,
131 const struct ir_scancode_table *origin);
132void ir_input_free(struct input_dev *input_dev);
133
134/* scancode->keycode map tables from ir-keymaps.c */ 100/* scancode->keycode map tables from ir-keymaps.c */
135 101
136extern struct ir_scancode_table ir_codes_empty_table; 102extern struct ir_scancode_table ir_codes_empty_table;
@@ -195,4 +161,5 @@ extern struct ir_scancode_table ir_codes_evga_indtube_table;
195extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table; 161extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;
196extern struct ir_scancode_table ir_codes_videomate_s350_table; 162extern struct ir_scancode_table ir_codes_videomate_s350_table;
197extern struct ir_scancode_table ir_codes_gadmei_rm008z_table; 163extern struct ir_scancode_table ir_codes_gadmei_rm008z_table;
164extern struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table;
198#endif 165#endif