12874c5fdSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later 2ce5aa6d2SYounian Wang /* 3ce5aa6d2SYounian Wang * Keytable for remote controller of HiSilicon tv demo board. 4ce5aa6d2SYounian Wang * 5ce5aa6d2SYounian Wang * Copyright (c) 2017 HiSilicon Technologies Co., Ltd. 6ce5aa6d2SYounian Wang */ 7ce5aa6d2SYounian Wang 8ce5aa6d2SYounian Wang #include <linux/module.h> 9ce5aa6d2SYounian Wang #include <media/rc-map.h> 10ce5aa6d2SYounian Wang 11ce5aa6d2SYounian Wang static struct rc_map_table hisi_tv_demo_keymap[] = { 12ce5aa6d2SYounian Wang { 0x00000092, KEY_1}, 13ce5aa6d2SYounian Wang { 0x00000093, KEY_2}, 14ce5aa6d2SYounian Wang { 0x000000cc, KEY_3}, 15ce5aa6d2SYounian Wang { 0x0000009f, KEY_4}, 16ce5aa6d2SYounian Wang { 0x0000008e, KEY_5}, 17ce5aa6d2SYounian Wang { 0x0000008f, KEY_6}, 18ce5aa6d2SYounian Wang { 0x000000c8, KEY_7}, 19ce5aa6d2SYounian Wang { 0x00000094, KEY_8}, 20ce5aa6d2SYounian Wang { 0x0000008a, KEY_9}, 21ce5aa6d2SYounian Wang { 0x0000008b, KEY_0}, 22ce5aa6d2SYounian Wang { 0x000000ce, KEY_ENTER}, 23ce5aa6d2SYounian Wang { 0x000000ca, KEY_UP}, 24ce5aa6d2SYounian Wang { 0x00000099, KEY_LEFT}, 25ce5aa6d2SYounian Wang { 0x00000084, KEY_PAGEUP}, 26ce5aa6d2SYounian Wang { 0x000000c1, KEY_RIGHT}, 27ce5aa6d2SYounian Wang { 0x000000d2, KEY_DOWN}, 28ce5aa6d2SYounian Wang { 0x00000089, KEY_PAGEDOWN}, 29ce5aa6d2SYounian Wang { 0x000000d1, KEY_MUTE}, 30ce5aa6d2SYounian Wang { 0x00000098, KEY_VOLUMEDOWN}, 31ce5aa6d2SYounian Wang { 0x00000090, KEY_VOLUMEUP}, 32ce5aa6d2SYounian Wang { 0x0000009c, KEY_POWER}, 33ce5aa6d2SYounian Wang { 0x000000d6, KEY_STOP}, 34ce5aa6d2SYounian Wang { 0x00000097, KEY_MENU}, 35ce5aa6d2SYounian Wang { 0x000000cb, KEY_BACK}, 36ce5aa6d2SYounian Wang { 0x000000da, KEY_PLAYPAUSE}, 37ce5aa6d2SYounian Wang { 0x00000080, KEY_INFO}, 38ce5aa6d2SYounian Wang { 0x000000c3, KEY_REWIND}, 39ce5aa6d2SYounian Wang { 0x00000087, KEY_HOMEPAGE}, 40ce5aa6d2SYounian Wang { 0x000000d0, KEY_FASTFORWARD}, 41ce5aa6d2SYounian Wang { 0x000000c4, KEY_SOUND}, 42ce5aa6d2SYounian Wang { 0x00000082, BTN_1}, 43ce5aa6d2SYounian Wang { 0x000000c7, BTN_2}, 44ce5aa6d2SYounian Wang { 0x00000086, KEY_PROGRAM}, 45ce5aa6d2SYounian Wang { 0x000000d9, KEY_SUBTITLE}, 46ce5aa6d2SYounian Wang { 0x00000085, KEY_ZOOM}, 47ce5aa6d2SYounian Wang { 0x0000009b, KEY_RED}, 48ce5aa6d2SYounian Wang { 0x0000009a, KEY_GREEN}, 49ce5aa6d2SYounian Wang { 0x000000c0, KEY_YELLOW}, 50ce5aa6d2SYounian Wang { 0x000000c2, KEY_BLUE}, 51ce5aa6d2SYounian Wang { 0x0000009d, KEY_CHANNELDOWN}, 52ce5aa6d2SYounian Wang { 0x000000cf, KEY_CHANNELUP}, 53ce5aa6d2SYounian Wang }; 54ce5aa6d2SYounian Wang 55ce5aa6d2SYounian Wang static struct rc_map_list hisi_tv_demo_map = { 56ce5aa6d2SYounian Wang .map = { 57ce5aa6d2SYounian Wang .scan = hisi_tv_demo_keymap, 58ce5aa6d2SYounian Wang .size = ARRAY_SIZE(hisi_tv_demo_keymap), 59ce5aa6d2SYounian Wang .rc_proto = RC_PROTO_NEC, 60ce5aa6d2SYounian Wang .name = RC_MAP_HISI_TV_DEMO, 61ce5aa6d2SYounian Wang } 62ce5aa6d2SYounian Wang }; 63ce5aa6d2SYounian Wang 64ce5aa6d2SYounian Wang static int __init init_rc_map_hisi_tv_demo(void) 65ce5aa6d2SYounian Wang { 66ce5aa6d2SYounian Wang return rc_map_register(&hisi_tv_demo_map); 67ce5aa6d2SYounian Wang } 68ce5aa6d2SYounian Wang 69ce5aa6d2SYounian Wang static void __exit exit_rc_map_hisi_tv_demo(void) 70ce5aa6d2SYounian Wang { 71ce5aa6d2SYounian Wang rc_map_unregister(&hisi_tv_demo_map); 72ce5aa6d2SYounian Wang } 73ce5aa6d2SYounian Wang 74ce5aa6d2SYounian Wang module_init(init_rc_map_hisi_tv_demo) 75ce5aa6d2SYounian Wang module_exit(exit_rc_map_hisi_tv_demo) 76ce5aa6d2SYounian Wang 77ce5aa6d2SYounian Wang MODULE_LICENSE("GPL v2"); 78