137307897SChristian Hewitt // SPDX-License-Identifier: GPL-2.0+
237307897SChristian Hewitt // Copyright (c) 2018 Christian Hewitt
337307897SChristian Hewitt 
437307897SChristian Hewitt #include <media/rc-map.h>
537307897SChristian Hewitt #include <linux/module.h>
637307897SChristian Hewitt 
737307897SChristian Hewitt /*
837307897SChristian Hewitt  * This keymap is used with the WeTek Hub STB.
937307897SChristian Hewitt  */
1037307897SChristian Hewitt 
1137307897SChristian Hewitt static struct rc_map_table wetek_hub[] = {
1237307897SChristian Hewitt 	{ 0x77f1, KEY_POWER },
1337307897SChristian Hewitt 
1437307897SChristian Hewitt 	{ 0x77f2, KEY_HOME },
1537307897SChristian Hewitt 	{ 0x77f3, KEY_MUTE }, // mouse
1637307897SChristian Hewitt 
1737307897SChristian Hewitt 	{ 0x77f4, KEY_UP },
1837307897SChristian Hewitt 	{ 0x77f5, KEY_DOWN },
1937307897SChristian Hewitt 	{ 0x77f6, KEY_LEFT },
2037307897SChristian Hewitt 	{ 0x77f7, KEY_RIGHT },
2137307897SChristian Hewitt 	{ 0x77f8, KEY_OK },
2237307897SChristian Hewitt 
2337307897SChristian Hewitt 	{ 0x77f9, KEY_BACK },
2437307897SChristian Hewitt 	{ 0x77fa, KEY_MENU },
2537307897SChristian Hewitt 
2637307897SChristian Hewitt 	{ 0x77fb, KEY_VOLUMEUP },
2737307897SChristian Hewitt 	{ 0x77fc, KEY_VOLUMEDOWN },
2837307897SChristian Hewitt };
2937307897SChristian Hewitt 
3037307897SChristian Hewitt static struct rc_map_list wetek_hub_map = {
3137307897SChristian Hewitt 	.map = {
3237307897SChristian Hewitt 		.scan     = wetek_hub,
3337307897SChristian Hewitt 		.size     = ARRAY_SIZE(wetek_hub),
3437307897SChristian Hewitt 		.rc_proto = RC_PROTO_NEC,
3537307897SChristian Hewitt 		.name     = RC_MAP_WETEK_HUB,
3637307897SChristian Hewitt 	}
3737307897SChristian Hewitt };
3837307897SChristian Hewitt 
init_rc_map_wetek_hub(void)3937307897SChristian Hewitt static int __init init_rc_map_wetek_hub(void)
4037307897SChristian Hewitt {
4137307897SChristian Hewitt 	return rc_map_register(&wetek_hub_map);
4237307897SChristian Hewitt }
4337307897SChristian Hewitt 
exit_rc_map_wetek_hub(void)4437307897SChristian Hewitt static void __exit exit_rc_map_wetek_hub(void)
4537307897SChristian Hewitt {
4637307897SChristian Hewitt 	rc_map_unregister(&wetek_hub_map);
4737307897SChristian Hewitt }
4837307897SChristian Hewitt 
4937307897SChristian Hewitt module_init(init_rc_map_wetek_hub)
5037307897SChristian Hewitt module_exit(exit_rc_map_wetek_hub)
5137307897SChristian Hewitt 
5237307897SChristian Hewitt MODULE_LICENSE("GPL");
5337307897SChristian Hewitt MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");
54