diff options
Diffstat (limited to 'include/media/rc-map.h')
-rw-r--r-- | include/media/rc-map.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index e0f17edf38ed..ee9e2f747c76 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -11,45 +11,45 @@ | |||
11 | 11 | ||
12 | #include <linux/input.h> | 12 | #include <linux/input.h> |
13 | 13 | ||
14 | #define IR_TYPE_UNKNOWN 0 | 14 | #define RC_TYPE_UNKNOWN 0 |
15 | #define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */ | 15 | #define RC_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */ |
16 | #define IR_TYPE_NEC (1 << 1) | 16 | #define RC_TYPE_NEC (1 << 1) |
17 | #define IR_TYPE_RC6 (1 << 2) /* Philips RC6 protocol */ | 17 | #define RC_TYPE_RC6 (1 << 2) /* Philips RC6 protocol */ |
18 | #define IR_TYPE_JVC (1 << 3) /* JVC protocol */ | 18 | #define RC_TYPE_JVC (1 << 3) /* JVC protocol */ |
19 | #define IR_TYPE_SONY (1 << 4) /* Sony12/15/20 protocol */ | 19 | #define RC_TYPE_SONY (1 << 4) /* Sony12/15/20 protocol */ |
20 | #define IR_TYPE_RC5_SZ (1 << 5) /* RC5 variant used by Streamzap */ | 20 | #define RC_TYPE_RC5_SZ (1 << 5) /* RC5 variant used by Streamzap */ |
21 | #define IR_TYPE_LIRC (1 << 30) /* Pass raw IR to lirc userspace */ | 21 | #define RC_TYPE_LIRC (1 << 30) /* Pass raw IR to lirc userspace */ |
22 | #define IR_TYPE_OTHER (1u << 31) | 22 | #define RC_TYPE_OTHER (1u << 31) |
23 | 23 | ||
24 | #define IR_TYPE_ALL (IR_TYPE_RC5 | IR_TYPE_NEC | IR_TYPE_RC6 | \ | 24 | #define RC_TYPE_ALL (RC_TYPE_RC5 | RC_TYPE_NEC | RC_TYPE_RC6 | \ |
25 | IR_TYPE_JVC | IR_TYPE_SONY | IR_TYPE_LIRC | \ | 25 | RC_TYPE_JVC | RC_TYPE_SONY | RC_TYPE_LIRC | \ |
26 | IR_TYPE_RC5_SZ | IR_TYPE_OTHER) | 26 | RC_TYPE_RC5_SZ | RC_TYPE_OTHER) |
27 | 27 | ||
28 | struct ir_scancode { | 28 | struct rc_map_table { |
29 | u32 scancode; | 29 | u32 scancode; |
30 | u32 keycode; | 30 | u32 keycode; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct ir_scancode_table { | 33 | struct rc_map { |
34 | struct ir_scancode *scan; | 34 | struct rc_map_table *scan; |
35 | unsigned int size; /* Max number of entries */ | 35 | unsigned int size; /* Max number of entries */ |
36 | unsigned int len; /* Used number of entries */ | 36 | unsigned int len; /* Used number of entries */ |
37 | unsigned int alloc; /* Size of *scan in bytes */ | 37 | unsigned int alloc; /* Size of *scan in bytes */ |
38 | u64 ir_type; | 38 | u64 rc_type; |
39 | const char *name; | 39 | const char *name; |
40 | spinlock_t lock; | 40 | spinlock_t lock; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct rc_keymap { | 43 | struct rc_map_list { |
44 | struct list_head list; | 44 | struct list_head list; |
45 | struct ir_scancode_table map; | 45 | struct rc_map map; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* Routines from rc-map.c */ | 48 | /* Routines from rc-map.c */ |
49 | 49 | ||
50 | int ir_register_map(struct rc_keymap *map); | 50 | int rc_map_register(struct rc_map_list *map); |
51 | void ir_unregister_map(struct rc_keymap *map); | 51 | void rc_map_unregister(struct rc_map_list *map); |
52 | struct ir_scancode_table *get_rc_map(const char *name); | 52 | struct rc_map *rc_map_get(const char *name); |
53 | void rc_map_init(void); | 53 | void rc_map_init(void); |
54 | 54 | ||
55 | /* Names of the several keytables defined in-kernel */ | 55 | /* Names of the several keytables defined in-kernel */ |
@@ -119,6 +119,7 @@ void rc_map_init(void); | |||
119 | #define RC_MAP_PINNACLE_PCTV_HD "rc-pinnacle-pctv-hd" | 119 | #define RC_MAP_PINNACLE_PCTV_HD "rc-pinnacle-pctv-hd" |
120 | #define RC_MAP_PIXELVIEW_NEW "rc-pixelview-new" | 120 | #define RC_MAP_PIXELVIEW_NEW "rc-pixelview-new" |
121 | #define RC_MAP_PIXELVIEW "rc-pixelview" | 121 | #define RC_MAP_PIXELVIEW "rc-pixelview" |
122 | #define RC_MAP_PIXELVIEW_002T "rc-pixelview-002t" | ||
122 | #define RC_MAP_PIXELVIEW_MK12 "rc-pixelview-mk12" | 123 | #define RC_MAP_PIXELVIEW_MK12 "rc-pixelview-mk12" |
123 | #define RC_MAP_POWERCOLOR_REAL_ANGEL "rc-powercolor-real-angel" | 124 | #define RC_MAP_POWERCOLOR_REAL_ANGEL "rc-powercolor-real-angel" |
124 | #define RC_MAP_PROTEUS_2309 "rc-proteus-2309" | 125 | #define RC_MAP_PROTEUS_2309 "rc-proteus-2309" |
@@ -137,6 +138,7 @@ void rc_map_init(void); | |||
137 | #define RC_MAP_TREKSTOR "rc-trekstor" | 138 | #define RC_MAP_TREKSTOR "rc-trekstor" |
138 | #define RC_MAP_TT_1500 "rc-tt-1500" | 139 | #define RC_MAP_TT_1500 "rc-tt-1500" |
139 | #define RC_MAP_TWINHAN_VP1027_DVBS "rc-twinhan1027" | 140 | #define RC_MAP_TWINHAN_VP1027_DVBS "rc-twinhan1027" |
141 | #define RC_MAP_VIDEOMATE_M1F "rc-videomate-m1f" | ||
140 | #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" | 142 | #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" |
141 | #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" | 143 | #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" |
142 | #define RC_MAP_WINFAST "rc-winfast" | 144 | #define RC_MAP_WINFAST "rc-winfast" |