rc-vega-s9x.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-2.0+
  2. //
  3. // Copyright (C) 2019 Christian Hewitt <[email protected]>
  4. #include <media/rc-map.h>
  5. #include <linux/module.h>
  6. //
  7. // Keytable for the Tronsmart Vega S9x remote control
  8. //
  9. static struct rc_map_table vega_s9x[] = {
  10. { 0x18, KEY_POWER },
  11. { 0x17, KEY_MUTE }, // mouse
  12. { 0x46, KEY_UP },
  13. { 0x47, KEY_LEFT },
  14. { 0x55, KEY_OK },
  15. { 0x15, KEY_RIGHT },
  16. { 0x16, KEY_DOWN },
  17. { 0x06, KEY_HOME },
  18. { 0x42, KEY_PLAYPAUSE},
  19. { 0x40, KEY_BACK },
  20. { 0x14, KEY_VOLUMEDOWN },
  21. { 0x04, KEY_MENU },
  22. { 0x10, KEY_VOLUMEUP },
  23. };
  24. static struct rc_map_list vega_s9x_map = {
  25. .map = {
  26. .scan = vega_s9x,
  27. .size = ARRAY_SIZE(vega_s9x),
  28. .rc_proto = RC_PROTO_NEC,
  29. .name = RC_MAP_VEGA_S9X,
  30. }
  31. };
  32. static int __init init_rc_map_vega_s9x(void)
  33. {
  34. return rc_map_register(&vega_s9x_map);
  35. }
  36. static void __exit exit_rc_map_vega_s9x(void)
  37. {
  38. rc_map_unregister(&vega_s9x_map);
  39. }
  40. module_init(init_rc_map_vega_s9x)
  41. module_exit(exit_rc_map_vega_s9x)
  42. MODULE_LICENSE("GPL");
  43. MODULE_AUTHOR("Christian Hewitt <[email protected]");