rc-reddo.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * MSI DIGIVOX mini III remote controller keytable
  4. *
  5. * Copyright (C) 2013 Antti Palosaari <[email protected]>
  6. */
  7. #include <media/rc-map.h>
  8. #include <linux/module.h>
  9. /*
  10. * Derived from MSI DIGIVOX mini III remote (rc-msi-digivox-iii.c)
  11. *
  12. * Differences between these remotes are:
  13. *
  14. * 1) scancode 0x61d601 is mapped to different button:
  15. * MSI DIGIVOX mini III "Source" = KEY_VIDEO
  16. * Reddo "EPG" = KEY_EPG
  17. *
  18. * 2) Reddo remote has less buttons. Missing buttons are: colored buttons,
  19. * navigation buttons and main power button.
  20. */
  21. static struct rc_map_table reddo[] = {
  22. { 0x61d601, KEY_EPG }, /* EPG */
  23. { 0x61d602, KEY_NUMERIC_3 },
  24. { 0x61d604, KEY_NUMERIC_1 },
  25. { 0x61d605, KEY_NUMERIC_5 },
  26. { 0x61d606, KEY_NUMERIC_6 },
  27. { 0x61d607, KEY_CHANNELDOWN }, /* CH- */
  28. { 0x61d608, KEY_NUMERIC_2 },
  29. { 0x61d609, KEY_CHANNELUP }, /* CH+ */
  30. { 0x61d60a, KEY_NUMERIC_9 },
  31. { 0x61d60b, KEY_ZOOM }, /* Zoom */
  32. { 0x61d60c, KEY_NUMERIC_7 },
  33. { 0x61d60d, KEY_NUMERIC_8 },
  34. { 0x61d60e, KEY_VOLUMEUP }, /* Vol+ */
  35. { 0x61d60f, KEY_NUMERIC_4 },
  36. { 0x61d610, KEY_ESC }, /* [back up arrow] */
  37. { 0x61d611, KEY_NUMERIC_0 },
  38. { 0x61d612, KEY_OK }, /* [enter arrow] */
  39. { 0x61d613, KEY_VOLUMEDOWN }, /* Vol- */
  40. { 0x61d614, KEY_RECORD }, /* Rec */
  41. { 0x61d615, KEY_STOP }, /* Stop */
  42. { 0x61d616, KEY_PLAY }, /* Play */
  43. { 0x61d617, KEY_MUTE }, /* Mute */
  44. { 0x61d643, KEY_POWER2 }, /* [red power button] */
  45. };
  46. static struct rc_map_list reddo_map = {
  47. .map = {
  48. .scan = reddo,
  49. .size = ARRAY_SIZE(reddo),
  50. .rc_proto = RC_PROTO_NECX,
  51. .name = RC_MAP_REDDO,
  52. }
  53. };
  54. static int __init init_rc_map_reddo(void)
  55. {
  56. return rc_map_register(&reddo_map);
  57. }
  58. static void __exit exit_rc_map_reddo(void)
  59. {
  60. rc_map_unregister(&reddo_map);
  61. }
  62. module_init(init_rc_map_reddo)
  63. module_exit(exit_rc_map_reddo)
  64. MODULE_LICENSE("GPL");
  65. MODULE_AUTHOR("Antti Palosaari <[email protected]>");