1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* keytable for Twinhan DTV CAB CI Remote Controller
3 *
4 * Copyright (c) 2010 by Igor M. Liplianin <liplianin@me.by>
5 */
6
7 #include <media/rc-map.h>
8 #include <linux/module.h>
9
10 static struct rc_map_table twinhan_dtv_cab_ci[] = {
11 { 0x29, KEY_POWER},
12 { 0x28, KEY_FAVORITES},
13 { 0x30, KEY_TEXT},
14 { 0x17, KEY_INFO}, /* Preview */
15 { 0x23, KEY_EPG},
16 { 0x3b, KEY_F22}, /* Record List */
17
18 { 0x3c, KEY_NUMERIC_1},
19 { 0x3e, KEY_NUMERIC_2},
20 { 0x39, KEY_NUMERIC_3},
21 { 0x36, KEY_NUMERIC_4},
22 { 0x22, KEY_NUMERIC_5},
23 { 0x20, KEY_NUMERIC_6},
24 { 0x32, KEY_NUMERIC_7},
25 { 0x26, KEY_NUMERIC_8},
26 { 0x24, KEY_NUMERIC_9},
27 { 0x2a, KEY_NUMERIC_0},
28
29 { 0x33, KEY_CANCEL},
30 { 0x2c, KEY_BACK},
31 { 0x15, KEY_CLEAR},
32 { 0x3f, KEY_TAB},
33 { 0x10, KEY_ENTER},
34 { 0x14, KEY_UP},
35 { 0x0d, KEY_RIGHT},
36 { 0x0e, KEY_DOWN},
37 { 0x11, KEY_LEFT},
38
39 { 0x21, KEY_VOLUMEUP},
40 { 0x35, KEY_VOLUMEDOWN},
41 { 0x3d, KEY_CHANNELDOWN},
42 { 0x3a, KEY_CHANNELUP},
43 { 0x2e, KEY_RECORD},
44 { 0x2b, KEY_PLAY},
45 { 0x13, KEY_PAUSE},
46 { 0x25, KEY_STOP},
47
48 { 0x1f, KEY_REWIND},
49 { 0x2d, KEY_FASTFORWARD},
50 { 0x1e, KEY_PREVIOUS}, /* Replay |< */
51 { 0x1d, KEY_NEXT}, /* Skip >| */
52
53 { 0x0b, KEY_CAMERA}, /* Capture */
54 { 0x0f, KEY_LANGUAGE}, /* SAP */
55 { 0x18, KEY_MODE}, /* PIP */
56 { 0x12, KEY_ZOOM}, /* Full screen */
57 { 0x1c, KEY_SUBTITLE},
58 { 0x2f, KEY_MUTE},
59 { 0x16, KEY_F20}, /* L/R */
60 { 0x38, KEY_F21}, /* Hibernate */
61
62 { 0x37, KEY_SWITCHVIDEOMODE}, /* A/V */
63 { 0x31, KEY_AGAIN}, /* Recall */
64 { 0x1a, KEY_KPPLUS}, /* Zoom+ */
65 { 0x19, KEY_KPMINUS}, /* Zoom- */
66 { 0x27, KEY_RED},
67 { 0x0C, KEY_GREEN},
68 { 0x01, KEY_YELLOW},
69 { 0x00, KEY_BLUE},
70 };
71
72 static struct rc_map_list twinhan_dtv_cab_ci_map = {
73 .map = {
74 .scan = twinhan_dtv_cab_ci,
75 .size = ARRAY_SIZE(twinhan_dtv_cab_ci),
76 .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
77 .name = RC_MAP_TWINHAN_DTV_CAB_CI,
78 }
79 };
80
init_rc_map_twinhan_dtv_cab_ci(void)81 static int __init init_rc_map_twinhan_dtv_cab_ci(void)
82 {
83 return rc_map_register(&twinhan_dtv_cab_ci_map);
84 }
85
exit_rc_map_twinhan_dtv_cab_ci(void)86 static void __exit exit_rc_map_twinhan_dtv_cab_ci(void)
87 {
88 rc_map_unregister(&twinhan_dtv_cab_ci_map);
89 }
90
91 module_init(init_rc_map_twinhan_dtv_cab_ci);
92 module_exit(exit_rc_map_twinhan_dtv_cab_ci);
93
94 MODULE_LICENSE("GPL");
95