rc-terratec-slim-2.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * TerraTec remote controller keytable
  4. *
  5. * Copyright (C) 2011 Martin Groszhauser <[email protected]>
  6. * Copyright (C) 2011 Antti Palosaari <[email protected]>
  7. */
  8. #include <media/rc-map.h>
  9. #include <linux/module.h>
  10. /*
  11. * TerraTec slim remote, 6 rows, 3 columns.
  12. * Keytable from Martin Groszhauser <[email protected]>
  13. */
  14. static struct rc_map_table terratec_slim_2[] = {
  15. { 0x8001, KEY_MUTE }, /* MUTE */
  16. { 0x8002, KEY_VOLUMEDOWN },
  17. { 0x8003, KEY_CHANNELDOWN },
  18. { 0x8004, KEY_NUMERIC_1 },
  19. { 0x8005, KEY_NUMERIC_2 },
  20. { 0x8006, KEY_NUMERIC_3 },
  21. { 0x8007, KEY_NUMERIC_4 },
  22. { 0x8008, KEY_NUMERIC_5 },
  23. { 0x8009, KEY_NUMERIC_6 },
  24. { 0x800a, KEY_NUMERIC_7 },
  25. { 0x800c, KEY_ZOOM }, /* [fullscreen] */
  26. { 0x800d, KEY_NUMERIC_0 },
  27. { 0x800e, KEY_AGAIN }, /* [two arrows forming a circle] */
  28. { 0x8012, KEY_POWER2 }, /* [red power button] */
  29. { 0x801a, KEY_VOLUMEUP },
  30. { 0x801b, KEY_NUMERIC_8 },
  31. { 0x801e, KEY_CHANNELUP },
  32. { 0x801f, KEY_NUMERIC_9 },
  33. };
  34. static struct rc_map_list terratec_slim_2_map = {
  35. .map = {
  36. .scan = terratec_slim_2,
  37. .size = ARRAY_SIZE(terratec_slim_2),
  38. .rc_proto = RC_PROTO_NEC,
  39. .name = RC_MAP_TERRATEC_SLIM_2,
  40. }
  41. };
  42. static int __init init_rc_map_terratec_slim_2(void)
  43. {
  44. return rc_map_register(&terratec_slim_2_map);
  45. }
  46. static void __exit exit_rc_map_terratec_slim_2(void)
  47. {
  48. rc_map_unregister(&terratec_slim_2_map);
  49. }
  50. module_init(init_rc_map_terratec_slim_2)
  51. module_exit(exit_rc_map_terratec_slim_2)
  52. MODULE_LICENSE("GPL");
  53. MODULE_AUTHOR("Antti Palosaari <[email protected]>");