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