55 lines · c
1// SPDX-License-Identifier: GPL-2.0+2// Copyright (c) 2018 Christian Hewitt3 4#include <media/rc-map.h>5#include <linux/module.h>6 7/*8 * This keymap is used with the WeTek Hub STB.9 */10 11static struct rc_map_table wetek_hub[] = {12 { 0x77f1, KEY_POWER },13 14 { 0x77f2, KEY_HOME },15 { 0x77f3, KEY_MUTE }, // mouse16 17 { 0x77f4, KEY_UP },18 { 0x77f5, KEY_DOWN },19 { 0x77f6, KEY_LEFT },20 { 0x77f7, KEY_RIGHT },21 { 0x77f8, KEY_OK },22 23 { 0x77f9, KEY_BACK },24 { 0x77fa, KEY_MENU },25 26 { 0x77fb, KEY_VOLUMEUP },27 { 0x77fc, KEY_VOLUMEDOWN },28};29 30static struct rc_map_list wetek_hub_map = {31 .map = {32 .scan = wetek_hub,33 .size = ARRAY_SIZE(wetek_hub),34 .rc_proto = RC_PROTO_NEC,35 .name = RC_MAP_WETEK_HUB,36 }37};38 39static int __init init_rc_map_wetek_hub(void)40{41 return rc_map_register(&wetek_hub_map);42}43 44static void __exit exit_rc_map_wetek_hub(void)45{46 rc_map_unregister(&wetek_hub_map);47}48 49module_init(init_rc_map_wetek_hub)50module_exit(exit_rc_map_wetek_hub)51 52MODULE_LICENSE("GPL");53MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");54MODULE_DESCRIPTION("WeTek Hub STB remote controller keytable");55