rc-geekbox.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Keytable for the GeekBox remote controller
  4. *
  5. * Copyright (C) 2017 Martin Blumenstingl <[email protected]>
  6. */
  7. #include <media/rc-map.h>
  8. #include <linux/module.h>
  9. static struct rc_map_table geekbox[] = {
  10. { 0x01, KEY_BACK },
  11. { 0x02, KEY_DOWN },
  12. { 0x03, KEY_UP },
  13. { 0x07, KEY_OK },
  14. { 0x0b, KEY_VOLUMEUP },
  15. { 0x0e, KEY_LEFT },
  16. { 0x13, KEY_MENU },
  17. { 0x14, KEY_POWER },
  18. { 0x1a, KEY_RIGHT },
  19. { 0x48, KEY_HOME },
  20. { 0x58, KEY_VOLUMEDOWN },
  21. { 0x5c, KEY_SCREEN },
  22. };
  23. static struct rc_map_list geekbox_map = {
  24. .map = {
  25. .scan = geekbox,
  26. .size = ARRAY_SIZE(geekbox),
  27. .rc_proto = RC_PROTO_NEC,
  28. .name = RC_MAP_GEEKBOX,
  29. }
  30. };
  31. static int __init init_rc_map_geekbox(void)
  32. {
  33. return rc_map_register(&geekbox_map);
  34. }
  35. static void __exit exit_rc_map_geekbox(void)
  36. {
  37. rc_map_unregister(&geekbox_map);
  38. }
  39. module_init(init_rc_map_geekbox)
  40. module_exit(exit_rc_map_geekbox)
  41. MODULE_LICENSE("GPL");
  42. MODULE_AUTHOR("Martin Blumenstingl <[email protected]>");