2 * Copyright (C) 2017 Sanechips Technology Co., Ltd.
3 * Copyright 2017 Linaro Ltd.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
10 #include <linux/module.h>
11 #include <media/rc-map.h>
13 static struct rc_map_table zx_irdec_table[] = {
25 { 0x0a, KEY_MODE }, /* Input method */
26 { 0x0c, KEY_VOLUMEUP },
27 { 0x18, KEY_VOLUMEDOWN },
28 { 0x0b, KEY_CHANNELUP },
29 { 0x15, KEY_CHANNELDOWN },
31 { 0x13, KEY_PAGEDOWN },
32 { 0x46, KEY_FASTFORWARD },
34 { 0x44, KEY_PLAYPAUSE },
42 { 0x56, KEY_APPSELECT }, /* Application */
51 { 0x11, KEY_DOT }, /* Location */
56 static struct rc_map_list zx_irdec_map = {
58 .scan = zx_irdec_table,
59 .size = ARRAY_SIZE(zx_irdec_table),
60 .rc_proto = RC_PROTO_NEC,
61 .name = RC_MAP_ZX_IRDEC,
65 static int __init init_rc_map_zx_irdec(void)
67 return rc_map_register(&zx_irdec_map);
70 static void __exit exit_rc_map_zx_irdec(void)
72 rc_map_unregister(&zx_irdec_map);
75 module_init(init_rc_map_zx_irdec)
76 module_exit(exit_rc_map_zx_irdec)
78 MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
79 MODULE_LICENSE("GPL v2");