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 Tronsmart Vega S9x remote control
0010 //
0011 
0012 static struct rc_map_table vega_s9x[] = {
0013     { 0x18, KEY_POWER },
0014     { 0x17, KEY_MUTE }, // mouse
0015 
0016     { 0x46, KEY_UP },
0017     { 0x47, KEY_LEFT },
0018     { 0x55, KEY_OK },
0019     { 0x15, KEY_RIGHT },
0020     { 0x16, KEY_DOWN },
0021 
0022     { 0x06, KEY_HOME },
0023     { 0x42, KEY_PLAYPAUSE},
0024     { 0x40, KEY_BACK },
0025 
0026     { 0x14, KEY_VOLUMEDOWN },
0027     { 0x04, KEY_MENU },
0028     { 0x10, KEY_VOLUMEUP },
0029 };
0030 
0031 static struct rc_map_list vega_s9x_map = {
0032     .map = {
0033         .scan     = vega_s9x,
0034         .size     = ARRAY_SIZE(vega_s9x),
0035         .rc_proto = RC_PROTO_NEC,
0036         .name     = RC_MAP_VEGA_S9X,
0037     }
0038 };
0039 
0040 static int __init init_rc_map_vega_s9x(void)
0041 {
0042     return rc_map_register(&vega_s9x_map);
0043 }
0044 
0045 static void __exit exit_rc_map_vega_s9x(void)
0046 {
0047     rc_map_unregister(&vega_s9x_map);
0048 }
0049 
0050 module_init(init_rc_map_vega_s9x)
0051 module_exit(exit_rc_map_vega_s9x)
0052 
0053 MODULE_LICENSE("GPL");
0054 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");