1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2017 Sanechips Technology Co., Ltd.
4 * Copyright 2017 Linaro Ltd.
7 #include <linux/module.h>
8 #include <media/rc-map.h>
10 static struct rc_map_table zx_irdec_table
[] = {
11 { 0x01, KEY_NUMERIC_1
},
12 { 0x02, KEY_NUMERIC_2
},
13 { 0x03, KEY_NUMERIC_3
},
14 { 0x04, KEY_NUMERIC_4
},
15 { 0x05, KEY_NUMERIC_5
},
16 { 0x06, KEY_NUMERIC_6
},
17 { 0x07, KEY_NUMERIC_7
},
18 { 0x08, KEY_NUMERIC_8
},
19 { 0x09, KEY_NUMERIC_9
},
20 { 0x31, KEY_NUMERIC_0
},
22 { 0x0a, KEY_MODE
}, /* Input method */
23 { 0x0c, KEY_VOLUMEUP
},
24 { 0x18, KEY_VOLUMEDOWN
},
25 { 0x0b, KEY_CHANNELUP
},
26 { 0x15, KEY_CHANNELDOWN
},
28 { 0x13, KEY_PAGEDOWN
},
29 { 0x46, KEY_FASTFORWARD
},
31 { 0x44, KEY_PLAYPAUSE
},
39 { 0x56, KEY_APPSELECT
}, /* Application */
48 { 0x11, KEY_DOT
}, /* Location */
53 static struct rc_map_list zx_irdec_map
= {
55 .scan
= zx_irdec_table
,
56 .size
= ARRAY_SIZE(zx_irdec_table
),
57 .rc_proto
= RC_PROTO_NEC
,
58 .name
= RC_MAP_ZX_IRDEC
,
62 static int __init
init_rc_map_zx_irdec(void)
64 return rc_map_register(&zx_irdec_map
);
67 static void __exit
exit_rc_map_zx_irdec(void)
69 rc_map_unregister(&zx_irdec_map
);
72 module_init(init_rc_map_zx_irdec
)
73 module_exit(exit_rc_map_zx_irdec
)
75 MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
76 MODULE_LICENSE("GPL v2");