rc-wetek-hub.c 1.0 KB

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