1 // SPDX-License-Identifier: GPL-2.0+
3 // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com>
5 #include <media/rc-map.h>
6 #include <linux/module.h>
9 // Keytable for the WeTek Play 2 STB remote control
12 static struct rc_map_table wetek_play2
[] = {
13 { 0x5e5f02, KEY_POWER
},
14 { 0x5e5f46, KEY_SLEEP
}, // tv
15 { 0x5e5f10, KEY_MUTE
},
29 { 0x5e5f71, KEY_BACK
},
31 { 0x5e5f72, KEY_CAPSLOCK
},
33 // outer ring clockwide from top
34 { 0x5e5f03, KEY_HOME
},
35 { 0x5e5f61, KEY_BACK
},
36 { 0x5e5f77, KEY_CONFIG
}, // mouse
37 { 0x5e5f83, KEY_EPG
},
38 { 0x5e5f84, KEY_SCREEN
}, // square
39 { 0x5e5f48, KEY_MENU
},
43 { 0x5e5f4b, KEY_DOWN
},
44 { 0x5e5f4c, KEY_LEFT
},
45 { 0x5e5f4d, KEY_RIGHT
},
48 { 0x5e5f44, KEY_VOLUMEUP
},
49 { 0x5e5f43, KEY_VOLUMEDOWN
},
50 { 0x5e5f4f, KEY_FAVORITES
},
51 { 0x5e5f82, KEY_SUBTITLE
}, // txt
52 { 0x5e5f41, KEY_PAGEUP
},
53 { 0x5e5f42, KEY_PAGEDOWN
},
55 { 0x5e5f73, KEY_RED
},
56 { 0x5e5f74, KEY_GREEN
},
57 { 0x5e5f75, KEY_YELLOW
},
58 { 0x5e5f76, KEY_BLUE
},
60 { 0x5e5f67, KEY_PREVIOUSSONG
},
61 { 0x5e5f79, KEY_REWIND
},
62 { 0x5e5f80, KEY_FASTFORWARD
},
63 { 0x5e5f81, KEY_NEXTSONG
},
65 { 0x5e5f04, KEY_RECORD
},
66 { 0x5e5f2c, KEY_PLAYPAUSE
},
67 { 0x5e5f2b, KEY_STOP
},
70 static struct rc_map_list wetek_play2_map
= {
73 .size
= ARRAY_SIZE(wetek_play2
),
74 .rc_proto
= RC_PROTO_NECX
,
75 .name
= RC_MAP_WETEK_PLAY2
,
79 static int __init
init_rc_map_wetek_play2(void)
81 return rc_map_register(&wetek_play2_map
);
84 static void __exit
exit_rc_map_wetek_play2(void)
86 rc_map_unregister(&wetek_play2_map
);
89 module_init(init_rc_map_wetek_play2
)
90 module_exit(exit_rc_map_wetek_play2
)
92 MODULE_LICENSE("GPL");
93 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");