Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 // Copyright (c) 2018 Christian Hewitt
0003 
0004 #include <media/rc-map.h>
0005 #include <linux/module.h>
0006 
0007 /*
0008  * Keymap for the Tanix TX3 mini STB remote control
0009  */
0010 
0011 static struct rc_map_table tanix_tx3mini[] = {
0012     { 0x8051, KEY_POWER },
0013     { 0x804d, KEY_MUTE },
0014 
0015     { 0x8009, KEY_RED },
0016     { 0x8011, KEY_GREEN },
0017     { 0x8054, KEY_YELLOW },
0018     { 0x804f, KEY_BLUE },
0019 
0020     { 0x8056, KEY_VOLUMEDOWN },
0021     { 0x80bd, KEY_PREVIOUS },
0022     { 0x80bb, KEY_NEXT },
0023     { 0x804e, KEY_VOLUMEUP },
0024 
0025     { 0x8053, KEY_HOME },
0026     { 0x801b, KEY_BACK },
0027 
0028     { 0x8026, KEY_UP },
0029     { 0x8028, KEY_DOWN },
0030     { 0x8025, KEY_LEFT },
0031     { 0x8027, KEY_RIGHT },
0032     { 0x800d, KEY_OK },
0033 
0034     { 0x8049, KEY_MENU },
0035     { 0x8052, KEY_EPG }, // mouse
0036 
0037     { 0x8031, KEY_1 },
0038     { 0x8032, KEY_2 },
0039     { 0x8033, KEY_3 },
0040 
0041     { 0x8034, KEY_4 },
0042     { 0x8035, KEY_5 },
0043     { 0x8036, KEY_6 },
0044 
0045     { 0x8037, KEY_7 },
0046     { 0x8038, KEY_8 },
0047     { 0x8039, KEY_9 },
0048 
0049     { 0x8058, KEY_SUBTITLE }, // 1/a
0050     { 0x8030, KEY_0 },
0051     { 0x8044, KEY_DELETE },
0052 };
0053 
0054 static struct rc_map_list tanix_tx3mini_map = {
0055     .map = {
0056         .scan     = tanix_tx3mini,
0057         .size     = ARRAY_SIZE(tanix_tx3mini),
0058         .rc_proto = RC_PROTO_NEC,
0059         .name     = RC_MAP_TANIX_TX3MINI,
0060     }
0061 };
0062 
0063 static int __init init_rc_map_tanix_tx3mini(void)
0064 {
0065     return rc_map_register(&tanix_tx3mini_map);
0066 }
0067 
0068 static void __exit exit_rc_map_tanix_tx3mini(void)
0069 {
0070     rc_map_unregister(&tanix_tx3mini_map);
0071 }
0072 
0073 module_init(init_rc_map_tanix_tx3mini)
0074 module_exit(exit_rc_map_tanix_tx3mini)
0075 
0076 MODULE_LICENSE("GPL");
0077 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");