Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 // Copyright (c) 2019 Clément Péron
0003 
0004 #include <media/rc-map.h>
0005 #include <linux/module.h>
0006 
0007 /*
0008  * Keymap for the Beelink GS1 remote control
0009  */
0010 
0011 static struct rc_map_table beelink_gs1_table[] = {
0012     /*
0013      * TV Keys (Power, Learn and Volume)
0014      * { 0x40400d, KEY_TV },
0015      * { 0x80f1, KEY_TV },
0016      * { 0x80f3, KEY_TV },
0017      * { 0x80f4, KEY_TV },
0018      */
0019 
0020     { 0x8051, KEY_POWER },
0021     { 0x804d, KEY_MUTE },
0022     { 0x8040, KEY_CONFIG },
0023 
0024     { 0x8026, KEY_UP },
0025     { 0x8028, KEY_DOWN },
0026     { 0x8025, KEY_LEFT },
0027     { 0x8027, KEY_RIGHT },
0028     { 0x800d, KEY_OK },
0029 
0030     { 0x8053, KEY_HOME },
0031     { 0x80bc, KEY_MEDIA },
0032     { 0x801b, KEY_BACK },
0033     { 0x8049, KEY_MENU },
0034 
0035     { 0x804e, KEY_VOLUMEUP },
0036     { 0x8056, KEY_VOLUMEDOWN },
0037 
0038     { 0x8054, KEY_SUBTITLE }, /* Web */
0039     { 0x8052, KEY_EPG }, /* Media */
0040 
0041     { 0x8041, KEY_CHANNELUP },
0042     { 0x8042, KEY_CHANNELDOWN },
0043 
0044     { 0x8031, KEY_1 },
0045     { 0x8032, KEY_2 },
0046     { 0x8033, KEY_3 },
0047 
0048     { 0x8034, KEY_4 },
0049     { 0x8035, KEY_5 },
0050     { 0x8036, KEY_6 },
0051 
0052     { 0x8037, KEY_7 },
0053     { 0x8038, KEY_8 },
0054     { 0x8039, KEY_9 },
0055 
0056     { 0x8044, KEY_DELETE },
0057     { 0x8030, KEY_0 },
0058     { 0x8058, KEY_MODE }, /* # Input Method */
0059 };
0060 
0061 static struct rc_map_list beelink_gs1_map = {
0062     .map = {
0063         .scan     = beelink_gs1_table,
0064         .size     = ARRAY_SIZE(beelink_gs1_table),
0065         .rc_proto = RC_PROTO_NEC,
0066         .name     = RC_MAP_BEELINK_GS1,
0067     }
0068 };
0069 
0070 static int __init init_rc_map_beelink_gs1(void)
0071 {
0072     return rc_map_register(&beelink_gs1_map);
0073 }
0074 
0075 static void __exit exit_rc_map_beelink_gs1(void)
0076 {
0077     rc_map_unregister(&beelink_gs1_map);
0078 }
0079 
0080 module_init(init_rc_map_beelink_gs1)
0081 module_exit(exit_rc_map_beelink_gs1)
0082 
0083 MODULE_LICENSE("GPL");
0084 MODULE_AUTHOR("Clément Péron <peron.clem@gmail.com>");