rc-leadtek-y04g0051.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * LeadTek Y04G0051 remote controller keytable
  3. *
  4. * Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
  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 as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. */
  20. #include <media/rc-map.h>
  21. #include <linux/module.h>
  22. static struct rc_map_table leadtek_y04g0051[] = {
  23. { 0x0300, KEY_POWER2 },
  24. { 0x0303, KEY_SCREEN },
  25. { 0x0304, KEY_RIGHT },
  26. { 0x0305, KEY_1 },
  27. { 0x0306, KEY_2 },
  28. { 0x0307, KEY_3 },
  29. { 0x0308, KEY_LEFT },
  30. { 0x0309, KEY_4 },
  31. { 0x030a, KEY_5 },
  32. { 0x030b, KEY_6 },
  33. { 0x030c, KEY_UP },
  34. { 0x030d, KEY_7 },
  35. { 0x030e, KEY_8 },
  36. { 0x030f, KEY_9 },
  37. { 0x0310, KEY_DOWN },
  38. { 0x0311, KEY_AGAIN },
  39. { 0x0312, KEY_0 },
  40. { 0x0313, KEY_OK }, /* 1st ok */
  41. { 0x0314, KEY_MUTE },
  42. { 0x0316, KEY_OK }, /* 2nd ok */
  43. { 0x031e, KEY_VIDEO }, /* 2nd video */
  44. { 0x031b, KEY_AUDIO },
  45. { 0x031f, KEY_TEXT },
  46. { 0x0340, KEY_SLEEP },
  47. { 0x0341, KEY_DOT },
  48. { 0x0342, KEY_REWIND },
  49. { 0x0343, KEY_PLAY },
  50. { 0x0344, KEY_FASTFORWARD },
  51. { 0x0345, KEY_TIME },
  52. { 0x0346, KEY_STOP }, /* 2nd stop */
  53. { 0x0347, KEY_RECORD },
  54. { 0x0348, KEY_CAMERA },
  55. { 0x0349, KEY_ESC },
  56. { 0x034a, KEY_NEW },
  57. { 0x034b, KEY_RED },
  58. { 0x034c, KEY_GREEN },
  59. { 0x034d, KEY_YELLOW },
  60. { 0x034e, KEY_BLUE },
  61. { 0x034f, KEY_MENU },
  62. { 0x0350, KEY_STOP }, /* 1st stop */
  63. { 0x0351, KEY_CHANNEL },
  64. { 0x0352, KEY_VIDEO }, /* 1st video */
  65. { 0x0353, KEY_EPG },
  66. { 0x0354, KEY_PREVIOUS },
  67. { 0x0355, KEY_NEXT },
  68. { 0x0356, KEY_TV },
  69. { 0x035a, KEY_VOLUMEDOWN },
  70. { 0x035b, KEY_CHANNELUP },
  71. { 0x035e, KEY_VOLUMEUP },
  72. { 0x035f, KEY_CHANNELDOWN },
  73. };
  74. static struct rc_map_list leadtek_y04g0051_map = {
  75. .map = {
  76. .scan = leadtek_y04g0051,
  77. .size = ARRAY_SIZE(leadtek_y04g0051),
  78. .rc_type = RC_TYPE_NEC,
  79. .name = RC_MAP_LEADTEK_Y04G0051,
  80. }
  81. };
  82. static int __init init_rc_map_leadtek_y04g0051(void)
  83. {
  84. return rc_map_register(&leadtek_y04g0051_map);
  85. }
  86. static void __exit exit_rc_map_leadtek_y04g0051(void)
  87. {
  88. rc_map_unregister(&leadtek_y04g0051_map);
  89. }
  90. module_init(init_rc_map_leadtek_y04g0051)
  91. module_exit(exit_rc_map_leadtek_y04g0051)
  92. MODULE_LICENSE("GPL");
  93. MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");