rc-hisi-poplar.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Keytable for remote controller of HiSilicon poplar board.
  3. *
  4. * Copyright (c) 2017 HiSilicon Technologies Co., Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #include <linux/module.h>
  12. #include <media/rc-map.h>
  13. static struct rc_map_table hisi_poplar_keymap[] = {
  14. { 0x0000b292, KEY_1},
  15. { 0x0000b293, KEY_2},
  16. { 0x0000b2cc, KEY_3},
  17. { 0x0000b28e, KEY_4},
  18. { 0x0000b28f, KEY_5},
  19. { 0x0000b2c8, KEY_6},
  20. { 0x0000b28a, KEY_7},
  21. { 0x0000b28b, KEY_8},
  22. { 0x0000b2c4, KEY_9},
  23. { 0x0000b287, KEY_0},
  24. { 0x0000b282, KEY_HOMEPAGE},
  25. { 0x0000b2ca, KEY_UP},
  26. { 0x0000b299, KEY_LEFT},
  27. { 0x0000b2c1, KEY_RIGHT},
  28. { 0x0000b2d2, KEY_DOWN},
  29. { 0x0000b2c5, KEY_DELETE},
  30. { 0x0000b29c, KEY_MUTE},
  31. { 0x0000b281, KEY_VOLUMEDOWN},
  32. { 0x0000b280, KEY_VOLUMEUP},
  33. { 0x0000b2dc, KEY_POWER},
  34. { 0x0000b29a, KEY_MENU},
  35. { 0x0000b28d, KEY_SETUP},
  36. { 0x0000b2c5, KEY_BACK},
  37. { 0x0000b295, KEY_PLAYPAUSE},
  38. { 0x0000b2ce, KEY_ENTER},
  39. { 0x0000b285, KEY_CHANNELUP},
  40. { 0x0000b286, KEY_CHANNELDOWN},
  41. { 0x0000b2da, KEY_NUMERIC_STAR},
  42. { 0x0000b2d0, KEY_NUMERIC_POUND},
  43. };
  44. static struct rc_map_list hisi_poplar_map = {
  45. .map = {
  46. .scan = hisi_poplar_keymap,
  47. .size = ARRAY_SIZE(hisi_poplar_keymap),
  48. .rc_proto = RC_PROTO_NEC,
  49. .name = RC_MAP_HISI_POPLAR,
  50. }
  51. };
  52. static int __init init_rc_map_hisi_poplar(void)
  53. {
  54. return rc_map_register(&hisi_poplar_map);
  55. }
  56. static void __exit exit_rc_map_hisi_poplar(void)
  57. {
  58. rc_map_unregister(&hisi_poplar_map);
  59. }
  60. module_init(init_rc_map_hisi_poplar)
  61. module_exit(exit_rc_map_hisi_poplar)
  62. MODULE_LICENSE("GPL v2");