rc-cinergy.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // SPDX-License-Identifier: GPL-2.0+
  2. // cinergy.h - Keytable for cinergy Remote Controller
  3. //
  4. // keymap imported from ir-keymaps.c
  5. //
  6. // Copyright (c) 2010 by Mauro Carvalho Chehab
  7. #include <media/rc-map.h>
  8. #include <linux/module.h>
  9. static struct rc_map_table cinergy[] = {
  10. { 0x00, KEY_0 },
  11. { 0x01, KEY_1 },
  12. { 0x02, KEY_2 },
  13. { 0x03, KEY_3 },
  14. { 0x04, KEY_4 },
  15. { 0x05, KEY_5 },
  16. { 0x06, KEY_6 },
  17. { 0x07, KEY_7 },
  18. { 0x08, KEY_8 },
  19. { 0x09, KEY_9 },
  20. { 0x0a, KEY_POWER },
  21. { 0x0b, KEY_MEDIA }, /* app */
  22. { 0x0c, KEY_ZOOM }, /* zoom/fullscreen */
  23. { 0x0d, KEY_CHANNELUP }, /* channel */
  24. { 0x0e, KEY_CHANNELDOWN }, /* channel- */
  25. { 0x0f, KEY_VOLUMEUP },
  26. { 0x10, KEY_VOLUMEDOWN },
  27. { 0x11, KEY_TUNER }, /* AV */
  28. { 0x12, KEY_NUMLOCK }, /* -/-- */
  29. { 0x13, KEY_AUDIO }, /* audio */
  30. { 0x14, KEY_MUTE },
  31. { 0x15, KEY_UP },
  32. { 0x16, KEY_DOWN },
  33. { 0x17, KEY_LEFT },
  34. { 0x18, KEY_RIGHT },
  35. { 0x19, BTN_LEFT, },
  36. { 0x1a, BTN_RIGHT, },
  37. { 0x1b, KEY_WWW }, /* text */
  38. { 0x1c, KEY_REWIND },
  39. { 0x1d, KEY_FORWARD },
  40. { 0x1e, KEY_RECORD },
  41. { 0x1f, KEY_PLAY },
  42. { 0x20, KEY_PREVIOUSSONG },
  43. { 0x21, KEY_NEXTSONG },
  44. { 0x22, KEY_PAUSE },
  45. { 0x23, KEY_STOP },
  46. };
  47. static struct rc_map_list cinergy_map = {
  48. .map = {
  49. .scan = cinergy,
  50. .size = ARRAY_SIZE(cinergy),
  51. .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
  52. .name = RC_MAP_CINERGY,
  53. }
  54. };
  55. static int __init init_rc_map_cinergy(void)
  56. {
  57. return rc_map_register(&cinergy_map);
  58. }
  59. static void __exit exit_rc_map_cinergy(void)
  60. {
  61. rc_map_unregister(&cinergy_map);
  62. }
  63. module_init(init_rc_map_cinergy)
  64. module_exit(exit_rc_map_cinergy)
  65. MODULE_LICENSE("GPL");
  66. MODULE_AUTHOR("Mauro Carvalho Chehab");