rc-hisi-tv-demo.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Keytable for remote controller of HiSilicon tv demo 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_tv_demo_keymap[] = {
  14. { 0x00000092, KEY_1},
  15. { 0x00000093, KEY_2},
  16. { 0x000000cc, KEY_3},
  17. { 0x0000009f, KEY_4},
  18. { 0x0000008e, KEY_5},
  19. { 0x0000008f, KEY_6},
  20. { 0x000000c8, KEY_7},
  21. { 0x00000094, KEY_8},
  22. { 0x0000008a, KEY_9},
  23. { 0x0000008b, KEY_0},
  24. { 0x000000ce, KEY_ENTER},
  25. { 0x000000ca, KEY_UP},
  26. { 0x00000099, KEY_LEFT},
  27. { 0x00000084, KEY_PAGEUP},
  28. { 0x000000c1, KEY_RIGHT},
  29. { 0x000000d2, KEY_DOWN},
  30. { 0x00000089, KEY_PAGEDOWN},
  31. { 0x000000d1, KEY_MUTE},
  32. { 0x00000098, KEY_VOLUMEDOWN},
  33. { 0x00000090, KEY_VOLUMEUP},
  34. { 0x0000009c, KEY_POWER},
  35. { 0x000000d6, KEY_STOP},
  36. { 0x00000097, KEY_MENU},
  37. { 0x000000cb, KEY_BACK},
  38. { 0x000000da, KEY_PLAYPAUSE},
  39. { 0x00000080, KEY_INFO},
  40. { 0x000000c3, KEY_REWIND},
  41. { 0x00000087, KEY_HOMEPAGE},
  42. { 0x000000d0, KEY_FASTFORWARD},
  43. { 0x000000c4, KEY_SOUND},
  44. { 0x00000082, BTN_1},
  45. { 0x000000c7, BTN_2},
  46. { 0x00000086, KEY_PROGRAM},
  47. { 0x000000d9, KEY_SUBTITLE},
  48. { 0x00000085, KEY_ZOOM},
  49. { 0x0000009b, KEY_RED},
  50. { 0x0000009a, KEY_GREEN},
  51. { 0x000000c0, KEY_YELLOW},
  52. { 0x000000c2, KEY_BLUE},
  53. { 0x0000009d, KEY_CHANNELDOWN},
  54. { 0x000000cf, KEY_CHANNELUP},
  55. };
  56. static struct rc_map_list hisi_tv_demo_map = {
  57. .map = {
  58. .scan = hisi_tv_demo_keymap,
  59. .size = ARRAY_SIZE(hisi_tv_demo_keymap),
  60. .rc_proto = RC_PROTO_NEC,
  61. .name = RC_MAP_HISI_TV_DEMO,
  62. }
  63. };
  64. static int __init init_rc_map_hisi_tv_demo(void)
  65. {
  66. return rc_map_register(&hisi_tv_demo_map);
  67. }
  68. static void __exit exit_rc_map_hisi_tv_demo(void)
  69. {
  70. rc_map_unregister(&hisi_tv_demo_map);
  71. }
  72. module_init(init_rc_map_hisi_tv_demo)
  73. module_exit(exit_rc_map_hisi_tv_demo)
  74. MODULE_LICENSE("GPL v2");