rc-samsung-necx.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #include <linux/module.h>
  13. #include <media/rc-map.h>
  14. static struct rc_map_table samsung_necx[] = {
  15. { 0x70702, KEY_POWER}, /* power */
  16. { 0x7070f, KEY_MUTE}, /* mute */
  17. { 0x70704, KEY_1},
  18. { 0x70705, KEY_2},
  19. { 0x70706, KEY_3},
  20. { 0x70708, KEY_4},
  21. { 0x70709, KEY_5},
  22. { 0x7070a, KEY_6},
  23. { 0x7070c, KEY_7},
  24. { 0x7070d, KEY_8},
  25. { 0x7070e, KEY_9},
  26. { 0x70711, KEY_0},
  27. { 0x70712, KEY_CHANNELUP},
  28. { 0x70710, KEY_CHANNELDOWN},
  29. { 0x70707, KEY_VOLUMEUP},
  30. { 0x7070b, KEY_VOLUMEDOWN},
  31. { 0x70760, KEY_UP},
  32. { 0x70768, KEY_ENTER},
  33. { 0x70761, KEY_DOWN},
  34. { 0x70765, KEY_LEFT},
  35. { 0x70762, KEY_RIGHT},
  36. { 0x7072d, KEY_EXIT},
  37. { 0x70749, KEY_RECORD},
  38. { 0x70747, KEY_PLAY},
  39. { 0x70746, KEY_STOP},
  40. { 0x70745, KEY_REWIND},
  41. { 0x70748, KEY_FORWARD},
  42. { 0x7074a, KEY_PAUSE},
  43. { 0x70703, KEY_SLEEP},
  44. { 0x7076c, KEY_RED},
  45. { 0x70714, KEY_GREEN},
  46. { 0x70715, KEY_YELLOW},
  47. { 0x70716, KEY_BLUE},
  48. { 0x70758, KEY_BACK},
  49. { 0x7071a, KEY_MENU},
  50. { 0x7076b, KEY_LIST},
  51. { 0x70701, KEY_TV2},
  52. { 0x7071f, KEY_INFO},
  53. { 0x7071b, KEY_TV},
  54. { 0x7078b, KEY_AUX},
  55. { 0x7078c, KEY_MEDIA},
  56. };
  57. static struct rc_map_list samsung_necx_map = {
  58. .map = {
  59. .scan = samsung_necx,
  60. .size = ARRAY_SIZE(samsung_necx),
  61. .rc_type = RC_TYPE_NEC,
  62. .name = RC_MAP_SAMSUNG_NECX,
  63. }
  64. };
  65. static int __init init_rc_map_samsung_necx(void)
  66. {
  67. return rc_map_register(&samsung_necx_map);
  68. }
  69. static void __exit exit_rc_map_samsung_necx(void)
  70. {
  71. rc_map_unregister(&samsung_necx_map);
  72. }
  73. module_init(init_rc_map_samsung_necx)
  74. module_exit(exit_rc_map_samsung_necx)
  75. MODULE_DESCRIPTION("SAMSUNG IR Remote Keymap");
  76. MODULE_LICENSE("GPL v2");