Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 //
0003 // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com>
0004 
0005 #include <media/rc-map.h>
0006 #include <linux/module.h>
0007 
0008 //
0009 // Keytable for the WeTek Play 2 STB remote control
0010 //
0011 
0012 static struct rc_map_table wetek_play2[] = {
0013     { 0x5e5f02, KEY_POWER },
0014     { 0x5e5f46, KEY_SLEEP }, // tv
0015     { 0x5e5f10, KEY_MUTE },
0016 
0017     { 0x5e5f22, KEY_1 },
0018     { 0x5e5f23, KEY_2 },
0019     { 0x5e5f24, KEY_3 },
0020 
0021     { 0x5e5f25, KEY_4 },
0022     { 0x5e5f26, KEY_5 },
0023     { 0x5e5f27, KEY_6 },
0024 
0025     { 0x5e5f28, KEY_7 },
0026     { 0x5e5f29, KEY_8 },
0027     { 0x5e5f30, KEY_9 },
0028 
0029     { 0x5e5f71, KEY_BACK },
0030     { 0x5e5f21, KEY_0 },
0031     { 0x5e5f72, KEY_CAPSLOCK },
0032 
0033     // outer ring clockwide from top
0034     { 0x5e5f03, KEY_HOME },
0035     { 0x5e5f61, KEY_BACK },
0036     { 0x5e5f77, KEY_CONFIG }, // mouse
0037     { 0x5e5f83, KEY_EPG },
0038     { 0x5e5f84, KEY_SCREEN }, // square
0039     { 0x5e5f48, KEY_MENU },
0040 
0041     // inner ring
0042     { 0x5e5f50, KEY_UP },
0043     { 0x5e5f4b, KEY_DOWN },
0044     { 0x5e5f4c, KEY_LEFT },
0045     { 0x5e5f4d, KEY_RIGHT },
0046     { 0x5e5f47, KEY_OK },
0047 
0048     { 0x5e5f44, KEY_VOLUMEUP },
0049     { 0x5e5f43, KEY_VOLUMEDOWN },
0050     { 0x5e5f4f, KEY_FAVORITES },
0051     { 0x5e5f82, KEY_SUBTITLE }, // txt
0052     { 0x5e5f41, KEY_PAGEUP },
0053     { 0x5e5f42, KEY_PAGEDOWN },
0054 
0055     { 0x5e5f73, KEY_RED },
0056     { 0x5e5f74, KEY_GREEN },
0057     { 0x5e5f75, KEY_YELLOW },
0058     { 0x5e5f76, KEY_BLUE },
0059 
0060     { 0x5e5f67, KEY_PREVIOUSSONG },
0061     { 0x5e5f79, KEY_REWIND },
0062     { 0x5e5f80, KEY_FASTFORWARD },
0063     { 0x5e5f81, KEY_NEXTSONG },
0064 
0065     { 0x5e5f04, KEY_RECORD },
0066     { 0x5e5f2c, KEY_PLAYPAUSE },
0067     { 0x5e5f2b, KEY_STOP },
0068 };
0069 
0070 static struct rc_map_list wetek_play2_map = {
0071     .map = {
0072         .scan     = wetek_play2,
0073         .size     = ARRAY_SIZE(wetek_play2),
0074         .rc_proto = RC_PROTO_NECX,
0075         .name     = RC_MAP_WETEK_PLAY2,
0076     }
0077 };
0078 
0079 static int __init init_rc_map_wetek_play2(void)
0080 {
0081     return rc_map_register(&wetek_play2_map);
0082 }
0083 
0084 static void __exit exit_rc_map_wetek_play2(void)
0085 {
0086     rc_map_unregister(&wetek_play2_map);
0087 }
0088 
0089 module_init(init_rc_map_wetek_play2)
0090 module_exit(exit_rc_map_wetek_play2)
0091 
0092 MODULE_LICENSE("GPL");
0093 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");