rc-philips.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 philips[] = {
  15. { 0x00, KEY_NUMERIC_0 },
  16. { 0x01, KEY_NUMERIC_1 },
  17. { 0x02, KEY_NUMERIC_2 },
  18. { 0x03, KEY_NUMERIC_3 },
  19. { 0x04, KEY_NUMERIC_4 },
  20. { 0x05, KEY_NUMERIC_5 },
  21. { 0x06, KEY_NUMERIC_6 },
  22. { 0x07, KEY_NUMERIC_7 },
  23. { 0x08, KEY_NUMERIC_8 },
  24. { 0x09, KEY_NUMERIC_9 },
  25. { 0xF4, KEY_SOUND },
  26. { 0xF3, KEY_SCREEN }, /* Picture */
  27. { 0x10, KEY_VOLUMEUP },
  28. { 0x11, KEY_VOLUMEDOWN },
  29. { 0x0d, KEY_MUTE },
  30. { 0x20, KEY_CHANNELUP },
  31. { 0x21, KEY_CHANNELDOWN },
  32. { 0x0A, KEY_BACK },
  33. { 0x0f, KEY_INFO },
  34. { 0x5c, KEY_OK },
  35. { 0x58, KEY_UP },
  36. { 0x59, KEY_DOWN },
  37. { 0x5a, KEY_LEFT },
  38. { 0x5b, KEY_RIGHT },
  39. { 0xcc, KEY_PAUSE },
  40. { 0x6d, KEY_PVR }, /* Demo */
  41. { 0x40, KEY_EXIT },
  42. { 0x6e, KEY_PROG1 }, /* Scenea */
  43. { 0x6f, KEY_MODE }, /* Dual */
  44. { 0x70, KEY_SLEEP },
  45. { 0xf5, KEY_TUNER }, /* Format */
  46. { 0x4f, KEY_TV },
  47. { 0x3c, KEY_NEW }, /* USB */
  48. { 0x38, KEY_COMPOSE }, /* Source */
  49. { 0x54, KEY_MENU },
  50. { 0x0C, KEY_POWER },
  51. };
  52. static struct rc_map_list rc6_philips_map = {
  53. .map = {
  54. .scan = philips,
  55. .size = ARRAY_SIZE(philips),
  56. .rc_type = RC_TYPE_RC6,
  57. .name = RC_MAP_RC6_PHILIPS,
  58. }
  59. };
  60. static int __init init_rc_map_rc6_philips(void)
  61. {
  62. return rc_map_register(&rc6_philips_map);
  63. }
  64. static void __exit exit_rc_map_rc6_philips(void)
  65. {
  66. rc_map_unregister(&rc6_philips_map);
  67. }
  68. module_init(init_rc_map_rc6_philips)
  69. module_exit(exit_rc_map_rc6_philips)
  70. MODULE_DESCRIPTION("Philips Remote Keymap ");
  71. MODULE_LICENSE("GPL v2");