rc-tango.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright (C) 2017 Sigma Designs
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * version 2 as published by the Free Software Foundation.
  7. */
  8. #include <linux/module.h>
  9. #include <media/rc-map.h>
  10. static struct rc_map_table tango_table[] = {
  11. { 0x4cb4a, KEY_POWER },
  12. { 0x4cb48, KEY_FILE },
  13. { 0x4cb0f, KEY_SETUP },
  14. { 0x4cb4d, KEY_SUSPEND },
  15. { 0x4cb4e, KEY_VOLUMEUP },
  16. { 0x4cb44, KEY_EJECTCD },
  17. { 0x4cb13, KEY_TV },
  18. { 0x4cb51, KEY_MUTE },
  19. { 0x4cb52, KEY_VOLUMEDOWN },
  20. { 0x4cb41, KEY_1 },
  21. { 0x4cb03, KEY_2 },
  22. { 0x4cb42, KEY_3 },
  23. { 0x4cb45, KEY_4 },
  24. { 0x4cb07, KEY_5 },
  25. { 0x4cb46, KEY_6 },
  26. { 0x4cb55, KEY_7 },
  27. { 0x4cb17, KEY_8 },
  28. { 0x4cb56, KEY_9 },
  29. { 0x4cb1b, KEY_0 },
  30. { 0x4cb59, KEY_DELETE },
  31. { 0x4cb5a, KEY_CAPSLOCK },
  32. { 0x4cb47, KEY_BACK },
  33. { 0x4cb05, KEY_SWITCHVIDEOMODE },
  34. { 0x4cb06, KEY_UP },
  35. { 0x4cb43, KEY_LEFT },
  36. { 0x4cb01, KEY_RIGHT },
  37. { 0x4cb0a, KEY_DOWN },
  38. { 0x4cb02, KEY_ENTER },
  39. { 0x4cb4b, KEY_INFO },
  40. { 0x4cb09, KEY_HOME },
  41. { 0x4cb53, KEY_MENU },
  42. { 0x4cb12, KEY_PREVIOUS },
  43. { 0x4cb50, KEY_PLAY },
  44. { 0x4cb11, KEY_NEXT },
  45. { 0x4cb4f, KEY_TITLE },
  46. { 0x4cb0e, KEY_REWIND },
  47. { 0x4cb4c, KEY_STOP },
  48. { 0x4cb0d, KEY_FORWARD },
  49. { 0x4cb57, KEY_MEDIA_REPEAT },
  50. { 0x4cb16, KEY_ANGLE },
  51. { 0x4cb54, KEY_PAUSE },
  52. { 0x4cb15, KEY_SLOW },
  53. { 0x4cb5b, KEY_TIME },
  54. { 0x4cb1a, KEY_AUDIO },
  55. { 0x4cb58, KEY_SUBTITLE },
  56. { 0x4cb19, KEY_ZOOM },
  57. { 0x4cb5f, KEY_RED },
  58. { 0x4cb1e, KEY_GREEN },
  59. { 0x4cb5c, KEY_YELLOW },
  60. { 0x4cb1d, KEY_BLUE },
  61. };
  62. static struct rc_map_list tango_map = {
  63. .map = {
  64. .scan = tango_table,
  65. .size = ARRAY_SIZE(tango_table),
  66. .rc_proto = RC_PROTO_NECX,
  67. .name = RC_MAP_TANGO,
  68. }
  69. };
  70. static int __init init_rc_map_tango(void)
  71. {
  72. return rc_map_register(&tango_map);
  73. }
  74. static void __exit exit_rc_map_tango(void)
  75. {
  76. rc_map_unregister(&tango_map);
  77. }
  78. module_init(init_rc_map_tango)
  79. module_exit(exit_rc_map_tango)
  80. MODULE_AUTHOR("Sigma Designs");
  81. MODULE_LICENSE("GPL");