rc-x96max.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 X96-max STB remote control
  8. //
  9. static struct rc_map_table x96max[] = {
  10. { 0x140, KEY_POWER },
  11. // ** TV CONTROL **
  12. // SET
  13. // AV/TV
  14. // POWER
  15. // VOLUME UP
  16. // VOLUME DOWN
  17. { 0x118, KEY_VOLUMEUP },
  18. { 0x110, KEY_VOLUMEDOWN },
  19. { 0x143, KEY_MUTE }, // config
  20. { 0x100, KEY_EPG }, // mouse
  21. { 0x119, KEY_BACK },
  22. { 0x116, KEY_UP },
  23. { 0x151, KEY_LEFT },
  24. { 0x150, KEY_RIGHT },
  25. { 0x11a, KEY_DOWN },
  26. { 0x113, KEY_OK },
  27. { 0x111, KEY_HOME },
  28. { 0x14c, KEY_CONTEXT_MENU },
  29. { 0x159, KEY_PREVIOUS },
  30. { 0x15a, KEY_PLAYPAUSE },
  31. { 0x158, KEY_NEXT },
  32. { 0x147, KEY_MENU }, // @ key
  33. { 0x101, KEY_NUMERIC_0 },
  34. { 0x142, KEY_BACKSPACE },
  35. { 0x14e, KEY_NUMERIC_1 },
  36. { 0x10d, KEY_NUMERIC_2 },
  37. { 0x10c, KEY_NUMERIC_3 },
  38. { 0x14a, KEY_NUMERIC_4 },
  39. { 0x109, KEY_NUMERIC_5 },
  40. { 0x108, KEY_NUMERIC_6 },
  41. { 0x146, KEY_NUMERIC_7 },
  42. { 0x105, KEY_NUMERIC_8 },
  43. { 0x104, KEY_NUMERIC_9 },
  44. };
  45. static struct rc_map_list x96max_map = {
  46. .map = {
  47. .scan = x96max,
  48. .size = ARRAY_SIZE(x96max),
  49. .rc_proto = RC_PROTO_NEC,
  50. .name = RC_MAP_X96MAX,
  51. }
  52. };
  53. static int __init init_rc_map_x96max(void)
  54. {
  55. return rc_map_register(&x96max_map);
  56. }
  57. static void __exit exit_rc_map_x96max(void)
  58. {
  59. rc_map_unregister(&x96max_map);
  60. }
  61. module_init(init_rc_map_x96max)
  62. module_exit(exit_rc_map_x96max)
  63. MODULE_LICENSE("GPL");
  64. MODULE_AUTHOR("Christian Hewitt <[email protected]");