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 HardKernel ODROID remote control
0010 //
0011 
0012 static struct rc_map_table odroid[] = {
0013     { 0xb2dc, KEY_POWER },
0014 
0015     { 0xb288, KEY_MUTE },
0016     { 0xb282, KEY_HOME },
0017 
0018     { 0xb2ca, KEY_UP },
0019     { 0xb299, KEY_LEFT },
0020     { 0xb2ce, KEY_OK },
0021     { 0xb2c1, KEY_RIGHT },
0022     { 0xb2d2, KEY_DOWN },
0023 
0024     { 0xb2c5, KEY_MENU },
0025     { 0xb29a, KEY_BACK },
0026 
0027     { 0xb281, KEY_VOLUMEDOWN },
0028     { 0xb280, KEY_VOLUMEUP },
0029 };
0030 
0031 static struct rc_map_list odroid_map = {
0032     .map = {
0033         .scan     = odroid,
0034         .size     = ARRAY_SIZE(odroid),
0035         .rc_proto = RC_PROTO_NEC,
0036         .name     = RC_MAP_ODROID,
0037     }
0038 };
0039 
0040 static int __init init_rc_map_odroid(void)
0041 {
0042     return rc_map_register(&odroid_map);
0043 }
0044 
0045 static void __exit exit_rc_map_odroid(void)
0046 {
0047     rc_map_unregister(&odroid_map);
0048 }
0049 
0050 module_init(init_rc_map_odroid)
0051 module_exit(exit_rc_map_odroid)
0052 
0053 MODULE_LICENSE("GPL");
0054 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");