12874c5fdSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
2c62cf662SYounian Wang /*
3c62cf662SYounian Wang * Keytable for remote controller of HiSilicon poplar board.
4c62cf662SYounian Wang *
5c62cf662SYounian Wang * Copyright (c) 2017 HiSilicon Technologies Co., Ltd.
6c62cf662SYounian Wang */
7c62cf662SYounian Wang
8c62cf662SYounian Wang #include <linux/module.h>
9c62cf662SYounian Wang #include <media/rc-map.h>
10c62cf662SYounian Wang
11c62cf662SYounian Wang static struct rc_map_table hisi_poplar_keymap[] = {
12*1910ea42SBastien Nocera { 0x0000b292, KEY_NUMERIC_1},
13*1910ea42SBastien Nocera { 0x0000b293, KEY_NUMERIC_2},
14*1910ea42SBastien Nocera { 0x0000b2cc, KEY_NUMERIC_3},
15*1910ea42SBastien Nocera { 0x0000b28e, KEY_NUMERIC_4},
16*1910ea42SBastien Nocera { 0x0000b28f, KEY_NUMERIC_5},
17*1910ea42SBastien Nocera { 0x0000b2c8, KEY_NUMERIC_6},
18*1910ea42SBastien Nocera { 0x0000b28a, KEY_NUMERIC_7},
19*1910ea42SBastien Nocera { 0x0000b28b, KEY_NUMERIC_8},
20*1910ea42SBastien Nocera { 0x0000b2c4, KEY_NUMERIC_9},
21*1910ea42SBastien Nocera { 0x0000b287, KEY_NUMERIC_0},
22c62cf662SYounian Wang { 0x0000b282, KEY_HOMEPAGE},
23c62cf662SYounian Wang { 0x0000b2ca, KEY_UP},
24c62cf662SYounian Wang { 0x0000b299, KEY_LEFT},
25c62cf662SYounian Wang { 0x0000b2c1, KEY_RIGHT},
26c62cf662SYounian Wang { 0x0000b2d2, KEY_DOWN},
27c62cf662SYounian Wang { 0x0000b2c5, KEY_DELETE},
28c62cf662SYounian Wang { 0x0000b29c, KEY_MUTE},
29c62cf662SYounian Wang { 0x0000b281, KEY_VOLUMEDOWN},
30c62cf662SYounian Wang { 0x0000b280, KEY_VOLUMEUP},
31c62cf662SYounian Wang { 0x0000b2dc, KEY_POWER},
32c62cf662SYounian Wang { 0x0000b29a, KEY_MENU},
33c62cf662SYounian Wang { 0x0000b28d, KEY_SETUP},
34c62cf662SYounian Wang { 0x0000b2c5, KEY_BACK},
35c62cf662SYounian Wang { 0x0000b295, KEY_PLAYPAUSE},
36c62cf662SYounian Wang { 0x0000b2ce, KEY_ENTER},
37c62cf662SYounian Wang { 0x0000b285, KEY_CHANNELUP},
38c62cf662SYounian Wang { 0x0000b286, KEY_CHANNELDOWN},
39c62cf662SYounian Wang { 0x0000b2da, KEY_NUMERIC_STAR},
40c62cf662SYounian Wang { 0x0000b2d0, KEY_NUMERIC_POUND},
41c62cf662SYounian Wang };
42c62cf662SYounian Wang
43c62cf662SYounian Wang static struct rc_map_list hisi_poplar_map = {
44c62cf662SYounian Wang .map = {
45c62cf662SYounian Wang .scan = hisi_poplar_keymap,
46c62cf662SYounian Wang .size = ARRAY_SIZE(hisi_poplar_keymap),
47c62cf662SYounian Wang .rc_proto = RC_PROTO_NEC,
48c62cf662SYounian Wang .name = RC_MAP_HISI_POPLAR,
49c62cf662SYounian Wang }
50c62cf662SYounian Wang };
51c62cf662SYounian Wang
init_rc_map_hisi_poplar(void)52c62cf662SYounian Wang static int __init init_rc_map_hisi_poplar(void)
53c62cf662SYounian Wang {
54c62cf662SYounian Wang return rc_map_register(&hisi_poplar_map);
55c62cf662SYounian Wang }
56c62cf662SYounian Wang
exit_rc_map_hisi_poplar(void)57c62cf662SYounian Wang static void __exit exit_rc_map_hisi_poplar(void)
58c62cf662SYounian Wang {
59c62cf662SYounian Wang rc_map_unregister(&hisi_poplar_map);
60c62cf662SYounian Wang }
61c62cf662SYounian Wang
62c62cf662SYounian Wang module_init(init_rc_map_hisi_poplar)
63c62cf662SYounian Wang module_exit(exit_rc_map_hisi_poplar)
64c62cf662SYounian Wang
65c62cf662SYounian Wang MODULE_LICENSE("GPL v2");
66