rc-geekbox.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Keytable for the GeekBox remote controller
  3. *
  4. * Copyright (C) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * You should have received a copy of the GNU General Public License
  11. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. #include <media/rc-map.h>
  14. #include <linux/module.h>
  15. static struct rc_map_table geekbox[] = {
  16. { 0x01, KEY_BACK },
  17. { 0x02, KEY_DOWN },
  18. { 0x03, KEY_UP },
  19. { 0x07, KEY_OK },
  20. { 0x0b, KEY_VOLUMEUP },
  21. { 0x0e, KEY_LEFT },
  22. { 0x13, KEY_MENU },
  23. { 0x14, KEY_POWER },
  24. { 0x1a, KEY_RIGHT },
  25. { 0x48, KEY_HOME },
  26. { 0x58, KEY_VOLUMEDOWN },
  27. { 0x5c, KEY_SCREEN },
  28. };
  29. static struct rc_map_list geekbox_map = {
  30. .map = {
  31. .scan = geekbox,
  32. .size = ARRAY_SIZE(geekbox),
  33. .rc_proto = RC_PROTO_NEC,
  34. .name = RC_MAP_GEEKBOX,
  35. }
  36. };
  37. static int __init init_rc_map_geekbox(void)
  38. {
  39. return rc_map_register(&geekbox_map);
  40. }
  41. static void __exit exit_rc_map_geekbox(void)
  42. {
  43. rc_map_unregister(&geekbox_map);
  44. }
  45. module_init(init_rc_map_geekbox)
  46. module_exit(exit_rc_map_geekbox)
  47. MODULE_LICENSE("GPL");
  48. MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");