rc-asus-ps3-100.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // SPDX-License-Identifier: GPL-2.0+
  2. // asus-ps3-100.h - Keytable for asus_ps3_100 Remote Controller
  3. //
  4. // Copyright (c) 2012 by Mauro Carvalho Chehab
  5. //
  6. // Based on a previous patch from Remi Schwartz <remi.schwartz@gmail.com>
  7. #include <media/rc-map.h>
  8. #include <linux/module.h>
  9. static struct rc_map_table asus_ps3_100[] = {
  10. { 0x081c, KEY_HOME }, /* home */
  11. { 0x081e, KEY_TV }, /* tv */
  12. { 0x0803, KEY_TEXT }, /* teletext */
  13. { 0x0829, KEY_POWER }, /* close */
  14. { 0x080b, KEY_RED }, /* red */
  15. { 0x080d, KEY_YELLOW }, /* yellow */
  16. { 0x0806, KEY_BLUE }, /* blue */
  17. { 0x0807, KEY_GREEN }, /* green */
  18. /* Keys 0 to 9 */
  19. { 0x082a, KEY_0 },
  20. { 0x0816, KEY_1 },
  21. { 0x0812, KEY_2 },
  22. { 0x0814, KEY_3 },
  23. { 0x0836, KEY_4 },
  24. { 0x0832, KEY_5 },
  25. { 0x0834, KEY_6 },
  26. { 0x080e, KEY_7 },
  27. { 0x080a, KEY_8 },
  28. { 0x080c, KEY_9 },
  29. { 0x0815, KEY_VOLUMEUP },
  30. { 0x0826, KEY_VOLUMEDOWN },
  31. { 0x0835, KEY_CHANNELUP }, /* channel / program + */
  32. { 0x0824, KEY_CHANNELDOWN }, /* channel / program - */
  33. { 0x0808, KEY_UP },
  34. { 0x0804, KEY_DOWN },
  35. { 0x0818, KEY_LEFT },
  36. { 0x0810, KEY_RIGHT },
  37. { 0x0825, KEY_ENTER }, /* enter */
  38. { 0x0822, KEY_EXIT }, /* back */
  39. { 0x082c, KEY_AB }, /* recall */
  40. { 0x0820, KEY_AUDIO }, /* TV audio */
  41. { 0x0837, KEY_SCREEN }, /* snapshot */
  42. { 0x082e, KEY_ZOOM }, /* full screen */
  43. { 0x0802, KEY_MUTE }, /* mute */
  44. { 0x0831, KEY_REWIND }, /* backward << */
  45. { 0x0811, KEY_RECORD }, /* recording */
  46. { 0x0809, KEY_STOP },
  47. { 0x0805, KEY_FASTFORWARD }, /* forward >> */
  48. { 0x0821, KEY_PREVIOUS }, /* rew */
  49. { 0x081a, KEY_PAUSE }, /* pause */
  50. { 0x0839, KEY_PLAY }, /* play */
  51. { 0x0819, KEY_NEXT }, /* forward */
  52. };
  53. static struct rc_map_list asus_ps3_100_map = {
  54. .map = {
  55. .scan = asus_ps3_100,
  56. .size = ARRAY_SIZE(asus_ps3_100),
  57. .rc_proto = RC_PROTO_RC5,
  58. .name = RC_MAP_ASUS_PS3_100,
  59. }
  60. };
  61. static int __init init_rc_map_asus_ps3_100(void)
  62. {
  63. return rc_map_register(&asus_ps3_100_map);
  64. }
  65. static void __exit exit_rc_map_asus_ps3_100(void)
  66. {
  67. rc_map_unregister(&asus_ps3_100_map);
  68. }
  69. module_init(init_rc_map_asus_ps3_100)
  70. module_exit(exit_rc_map_asus_ps3_100)
  71. MODULE_LICENSE("GPL");
  72. MODULE_AUTHOR("Mauro Carvalho Chehab");