rc-khamsin.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // SPDX-License-Identifier: GPL-2.0+
  2. // Copyright (c) 2020 Christian Hewitt
  3. #include <media/rc-map.h>
  4. #include <linux/module.h>
  5. /*
  6. * KHAMSIN is an IR/Bluetooth RCU supplied with the SmartLabs
  7. * SML-5442TW DVB-S/VOD box. The RCU has separate IR (TV) and
  8. * BT (STB) modes. This keymap suppors the IR controls.
  9. */
  10. static struct rc_map_table khamsin[] = {
  11. { 0x70702, KEY_POWER},
  12. { 0x70701, KEY_VIDEO}, // source
  13. { 0x7076c, KEY_RED},
  14. { 0x70714, KEY_GREEN},
  15. { 0x70715, KEY_YELLOW},
  16. { 0x70716, KEY_BLUE},
  17. { 0x7071a, KEY_MENU},
  18. { 0x7074f, KEY_EPG},
  19. { 0x70760, KEY_UP },
  20. { 0x70761, KEY_DOWN },
  21. { 0x70765, KEY_LEFT },
  22. { 0x70762, KEY_RIGHT },
  23. { 0x70768, KEY_ENTER },
  24. { 0x7072d, KEY_ESC }, // back
  25. { 0x70707, KEY_VOLUMEUP },
  26. { 0x7070b, KEY_VOLUMEDOWN },
  27. { 0x7070f, KEY_MUTE },
  28. { 0x70712, KEY_CHANNELUP },
  29. { 0x70710, KEY_CHANNELDOWN },
  30. { 0x70704, KEY_1 },
  31. { 0x70705, KEY_2 },
  32. { 0x70706, KEY_3 },
  33. { 0x70708, KEY_4 },
  34. { 0x70709, KEY_5 },
  35. { 0x7070a, KEY_6 },
  36. { 0x7070c, KEY_7 },
  37. { 0x7070d, KEY_8 },
  38. { 0x7070e, KEY_9 },
  39. { 0x70711, KEY_0 },
  40. };
  41. static struct rc_map_list khamsin_map = {
  42. .map = {
  43. .scan = khamsin,
  44. .size = ARRAY_SIZE(khamsin),
  45. .rc_proto = RC_PROTO_NECX,
  46. .name = RC_MAP_KHAMSIN,
  47. }
  48. };
  49. static int __init init_rc_map_khamsin(void)
  50. {
  51. return rc_map_register(&khamsin_map);
  52. }
  53. static void __exit exit_rc_map_khamsin(void)
  54. {
  55. rc_map_unregister(&khamsin_map);
  56. }
  57. module_init(init_rc_map_khamsin)
  58. module_exit(exit_rc_map_khamsin)
  59. MODULE_LICENSE("GPL");
  60. MODULE_AUTHOR("Christian Hewitt <[email protected]>");