rc-tanix-tx5max.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. * Keymap for the Tanix TX5 max STB remote control
  7. */
  8. static struct rc_map_table tanix_tx5max[] = {
  9. { 0x40404d, KEY_POWER },
  10. { 0x404043, KEY_MUTE },
  11. { 0x404017, KEY_VOLUMEDOWN },
  12. { 0x404018, KEY_VOLUMEUP },
  13. { 0x40400b, KEY_UP },
  14. { 0x404010, KEY_LEFT },
  15. { 0x404011, KEY_RIGHT },
  16. { 0x40400e, KEY_DOWN },
  17. { 0x40400d, KEY_OK },
  18. { 0x40401a, KEY_HOME },
  19. { 0x404045, KEY_MENU },
  20. { 0x404042, KEY_BACK },
  21. { 0x404001, KEY_1 },
  22. { 0x404002, KEY_2 },
  23. { 0x404003, KEY_3 },
  24. { 0x404004, KEY_4 },
  25. { 0x404005, KEY_5 },
  26. { 0x404006, KEY_6 },
  27. { 0x404007, KEY_7 },
  28. { 0x404008, KEY_8 },
  29. { 0x404009, KEY_9 },
  30. { 0x404047, KEY_SUBTITLE }, // mouse
  31. { 0x404000, KEY_0 },
  32. { 0x40400c, KEY_DELETE },
  33. };
  34. static struct rc_map_list tanix_tx5max_map = {
  35. .map = {
  36. .scan = tanix_tx5max,
  37. .size = ARRAY_SIZE(tanix_tx5max),
  38. .rc_proto = RC_PROTO_NECX,
  39. .name = RC_MAP_TANIX_TX5MAX,
  40. }
  41. };
  42. static int __init init_rc_map_tanix_tx5max(void)
  43. {
  44. return rc_map_register(&tanix_tx5max_map);
  45. }
  46. static void __exit exit_rc_map_tanix_tx5max(void)
  47. {
  48. rc_map_unregister(&tanix_tx5max_map);
  49. }
  50. module_init(init_rc_map_tanix_tx5max)
  51. module_exit(exit_rc_map_tanix_tx5max)
  52. MODULE_LICENSE("GPL");
  53. MODULE_AUTHOR("Christian Hewitt <[email protected]>");