diff options
Diffstat (limited to 'drivers/media/dvb/siano/smsir.h')
-rw-r--r-- | drivers/media/dvb/siano/smsir.h | 63 |
1 files changed, 13 insertions, 50 deletions
diff --git a/drivers/media/dvb/siano/smsir.h b/drivers/media/dvb/siano/smsir.h index b7d703e2d338..926e247523bd 100644 --- a/drivers/media/dvb/siano/smsir.h +++ b/drivers/media/dvb/siano/smsir.h | |||
@@ -4,6 +4,11 @@ Siano Mobile Silicon, Inc. | |||
4 | MDTV receiver kernel modules. | 4 | MDTV receiver kernel modules. |
5 | Copyright (C) 2006-2009, Uri Shkolnik | 5 | Copyright (C) 2006-2009, Uri Shkolnik |
6 | 6 | ||
7 | Copyright (c) 2010 - Mauro Carvalho Chehab | ||
8 | - Ported the driver to use rc-core | ||
9 | - IR raw event decoding is now done at rc-core | ||
10 | - Code almost re-written | ||
11 | |||
7 | This program is free software: you can redistribute it and/or modify | 12 | This program is free software: you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | 13 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation, either version 2 of the License, or | 14 | the Free Software Foundation, either version 2 of the License, or |
@@ -23,63 +28,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
23 | #define __SMS_IR_H__ | 28 | #define __SMS_IR_H__ |
24 | 29 | ||
25 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <media/ir-core.h> | ||
26 | 32 | ||
27 | #define IR_DEV_NAME_MAX_LEN 23 /* "SMS IR kbd type nn\0" */ | ||
28 | #define IR_KEYBOARD_LAYOUT_SIZE 64 | ||
29 | #define IR_DEFAULT_TIMEOUT 100 | 33 | #define IR_DEFAULT_TIMEOUT 100 |
30 | 34 | ||
31 | enum ir_kb_type { | ||
32 | SMS_IR_KB_DEFAULT_TV, | ||
33 | SMS_IR_KB_HCW_SILVER | ||
34 | }; | ||
35 | |||
36 | enum rc5_keyboard_address { | ||
37 | KEYBOARD_ADDRESS_TV1 = 0, | ||
38 | KEYBOARD_ADDRESS_TV2 = 1, | ||
39 | KEYBOARD_ADDRESS_TELETEXT = 2, | ||
40 | KEYBOARD_ADDRESS_VIDEO = 3, | ||
41 | KEYBOARD_ADDRESS_LV1 = 4, | ||
42 | KEYBOARD_ADDRESS_VCR1 = 5, | ||
43 | KEYBOARD_ADDRESS_VCR2 = 6, | ||
44 | KEYBOARD_ADDRESS_EXPERIMENTAL = 7, | ||
45 | KEYBOARD_ADDRESS_SAT1 = 8, | ||
46 | KEYBOARD_ADDRESS_CAMERA = 9, | ||
47 | KEYBOARD_ADDRESS_SAT2 = 10, | ||
48 | KEYBOARD_ADDRESS_CDV = 12, | ||
49 | KEYBOARD_ADDRESS_CAMCORDER = 13, | ||
50 | KEYBOARD_ADDRESS_PRE_AMP = 16, | ||
51 | KEYBOARD_ADDRESS_TUNER = 17, | ||
52 | KEYBOARD_ADDRESS_RECORDER1 = 18, | ||
53 | KEYBOARD_ADDRESS_PRE_AMP1 = 19, | ||
54 | KEYBOARD_ADDRESS_CD_PLAYER = 20, | ||
55 | KEYBOARD_ADDRESS_PHONO = 21, | ||
56 | KEYBOARD_ADDRESS_SATA = 22, | ||
57 | KEYBOARD_ADDRESS_RECORDER2 = 23, | ||
58 | KEYBOARD_ADDRESS_CDR = 26, | ||
59 | KEYBOARD_ADDRESS_LIGHTING = 29, | ||
60 | KEYBOARD_ADDRESS_LIGHTING1 = 30, /* KEYBOARD_ADDRESS_HCW_SILVER */ | ||
61 | KEYBOARD_ADDRESS_PHONE = 31, | ||
62 | KEYBOARD_ADDRESS_NOT_RC5 = 0xFFFF | ||
63 | }; | ||
64 | |||
65 | enum ir_protocol { | ||
66 | IR_RC5, | ||
67 | IR_RCMM | ||
68 | }; | ||
69 | |||
70 | struct keyboard_layout_map_t { | ||
71 | enum ir_protocol ir_protocol; | ||
72 | enum rc5_keyboard_address rc5_kbd_address; | ||
73 | u16 keyboard_layout_map[IR_KEYBOARD_LAYOUT_SIZE]; | ||
74 | }; | ||
75 | |||
76 | struct smscore_device_t; | 35 | struct smscore_device_t; |
77 | 36 | ||
78 | struct ir_t { | 37 | struct ir_t { |
79 | struct input_dev *input_dev; | 38 | struct input_dev *input_dev; |
80 | enum ir_kb_type ir_kb_type; | 39 | char name[40]; |
81 | char name[IR_DEV_NAME_MAX_LEN+1]; | 40 | char phys[32]; |
82 | u16 *keyboard_layout_map; | 41 | |
42 | char *rc_codes; | ||
43 | u64 protocol; | ||
44 | struct ir_dev_props props; | ||
45 | |||
83 | u32 timeout; | 46 | u32 timeout; |
84 | u32 controller; | 47 | u32 controller; |
85 | }; | 48 | }; |