1 // SPDX-License-Identifier: GPL-2.0+
2 // cinergy.h - Keytable for cinergy Remote Controller
3 //
4 // keymap imported from ir-keymaps.c
5 //
6 // Copyright (c) 2010 by Mauro Carvalho Chehab
7
8 #include <media/rc-map.h>
9 #include <linux/module.h>
10
11 static struct rc_map_table cinergy[] = {
12 { 0x00, KEY_NUMERIC_0 },
13 { 0x01, KEY_NUMERIC_1 },
14 { 0x02, KEY_NUMERIC_2 },
15 { 0x03, KEY_NUMERIC_3 },
16 { 0x04, KEY_NUMERIC_4 },
17 { 0x05, KEY_NUMERIC_5 },
18 { 0x06, KEY_NUMERIC_6 },
19 { 0x07, KEY_NUMERIC_7 },
20 { 0x08, KEY_NUMERIC_8 },
21 { 0x09, KEY_NUMERIC_9 },
22
23 { 0x0a, KEY_POWER },
24 { 0x0b, KEY_MEDIA }, /* app */
25 { 0x0c, KEY_ZOOM }, /* zoom/fullscreen */
26 { 0x0d, KEY_CHANNELUP }, /* channel */
27 { 0x0e, KEY_CHANNELDOWN }, /* channel- */
28 { 0x0f, KEY_VOLUMEUP },
29 { 0x10, KEY_VOLUMEDOWN },
30 { 0x11, KEY_TUNER }, /* AV */
31 { 0x12, KEY_NUMLOCK }, /* -/-- */
32 { 0x13, KEY_AUDIO }, /* audio */
33 { 0x14, KEY_MUTE },
34 { 0x15, KEY_UP },
35 { 0x16, KEY_DOWN },
36 { 0x17, KEY_LEFT },
37 { 0x18, KEY_RIGHT },
38 { 0x19, BTN_LEFT, },
39 { 0x1a, BTN_RIGHT, },
40 { 0x1b, KEY_WWW }, /* text */
41 { 0x1c, KEY_REWIND },
42 { 0x1d, KEY_FORWARD },
43 { 0x1e, KEY_RECORD },
44 { 0x1f, KEY_PLAY },
45 { 0x20, KEY_PREVIOUSSONG },
46 { 0x21, KEY_NEXTSONG },
47 { 0x22, KEY_PAUSE },
48 { 0x23, KEY_STOP },
49 };
50
51 static struct rc_map_list cinergy_map = {
52 .map = {
53 .scan = cinergy,
54 .size = ARRAY_SIZE(cinergy),
55 .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
56 .name = RC_MAP_CINERGY,
57 }
58 };
59
init_rc_map_cinergy(void)60 static int __init init_rc_map_cinergy(void)
61 {
62 return rc_map_register(&cinergy_map);
63 }
64
exit_rc_map_cinergy(void)65 static void __exit exit_rc_map_cinergy(void)
66 {
67 rc_map_unregister(&cinergy_map);
68 }
69
70 module_init(init_rc_map_cinergy)
71 module_exit(exit_rc_map_cinergy)
72
73 MODULE_LICENSE("GPL");
74 MODULE_AUTHOR("Mauro Carvalho Chehab");
75