rc-odroid.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-2.0+
  2. //
  3. // Copyright (C) 2019 Christian Hewitt <[email protected]>
  4. #include <media/rc-map.h>
  5. #include <linux/module.h>
  6. //
  7. // Keytable for the HardKernel ODROID remote control
  8. //
  9. static struct rc_map_table odroid[] = {
  10. { 0xb2dc, KEY_POWER },
  11. { 0xb288, KEY_MUTE },
  12. { 0xb282, KEY_HOME },
  13. { 0xb2ca, KEY_UP },
  14. { 0xb299, KEY_LEFT },
  15. { 0xb2ce, KEY_OK },
  16. { 0xb2c1, KEY_RIGHT },
  17. { 0xb2d2, KEY_DOWN },
  18. { 0xb2c5, KEY_MENU },
  19. { 0xb29a, KEY_BACK },
  20. { 0xb281, KEY_VOLUMEDOWN },
  21. { 0xb280, KEY_VOLUMEUP },
  22. };
  23. static struct rc_map_list odroid_map = {
  24. .map = {
  25. .scan = odroid,
  26. .size = ARRAY_SIZE(odroid),
  27. .rc_proto = RC_PROTO_NEC,
  28. .name = RC_MAP_ODROID,
  29. }
  30. };
  31. static int __init init_rc_map_odroid(void)
  32. {
  33. return rc_map_register(&odroid_map);
  34. }
  35. static void __exit exit_rc_map_odroid(void)
  36. {
  37. rc_map_unregister(&odroid_map);
  38. }
  39. module_init(init_rc_map_odroid)
  40. module_exit(exit_rc_map_odroid)
  41. MODULE_LICENSE("GPL");
  42. MODULE_AUTHOR("Christian Hewitt <[email protected]");