Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Keytable for remote controller of HiSilicon poplar board.
0004  *
0005  * Copyright (c) 2017 HiSilicon Technologies Co., Ltd.
0006  */
0007 
0008 #include <linux/module.h>
0009 #include <media/rc-map.h>
0010 
0011 static struct rc_map_table hisi_poplar_keymap[] = {
0012     { 0x0000b292, KEY_NUMERIC_1},
0013     { 0x0000b293, KEY_NUMERIC_2},
0014     { 0x0000b2cc, KEY_NUMERIC_3},
0015     { 0x0000b28e, KEY_NUMERIC_4},
0016     { 0x0000b28f, KEY_NUMERIC_5},
0017     { 0x0000b2c8, KEY_NUMERIC_6},
0018     { 0x0000b28a, KEY_NUMERIC_7},
0019     { 0x0000b28b, KEY_NUMERIC_8},
0020     { 0x0000b2c4, KEY_NUMERIC_9},
0021     { 0x0000b287, KEY_NUMERIC_0},
0022     { 0x0000b282, KEY_HOMEPAGE},
0023     { 0x0000b2ca, KEY_UP},
0024     { 0x0000b299, KEY_LEFT},
0025     { 0x0000b2c1, KEY_RIGHT},
0026     { 0x0000b2d2, KEY_DOWN},
0027     { 0x0000b2c5, KEY_DELETE},
0028     { 0x0000b29c, KEY_MUTE},
0029     { 0x0000b281, KEY_VOLUMEDOWN},
0030     { 0x0000b280, KEY_VOLUMEUP},
0031     { 0x0000b2dc, KEY_POWER},
0032     { 0x0000b29a, KEY_MENU},
0033     { 0x0000b28d, KEY_SETUP},
0034     { 0x0000b2c5, KEY_BACK},
0035     { 0x0000b295, KEY_PLAYPAUSE},
0036     { 0x0000b2ce, KEY_ENTER},
0037     { 0x0000b285, KEY_CHANNELUP},
0038     { 0x0000b286, KEY_CHANNELDOWN},
0039     { 0x0000b2da, KEY_NUMERIC_STAR},
0040     { 0x0000b2d0, KEY_NUMERIC_POUND},
0041 };
0042 
0043 static struct rc_map_list hisi_poplar_map = {
0044     .map = {
0045         .scan     = hisi_poplar_keymap,
0046         .size     = ARRAY_SIZE(hisi_poplar_keymap),
0047         .rc_proto = RC_PROTO_NEC,
0048         .name     = RC_MAP_HISI_POPLAR,
0049     }
0050 };
0051 
0052 static int __init init_rc_map_hisi_poplar(void)
0053 {
0054     return rc_map_register(&hisi_poplar_map);
0055 }
0056 
0057 static void __exit exit_rc_map_hisi_poplar(void)
0058 {
0059     rc_map_unregister(&hisi_poplar_map);
0060 }
0061 
0062 module_init(init_rc_map_hisi_poplar)
0063 module_exit(exit_rc_map_hisi_poplar)
0064 
0065 MODULE_LICENSE("GPL v2");