1 // SPDX-License-Identifier: GPL-2.0+ 2 // manli.h - Keytable for manli Remote Controller 3 // 4 // keymap imported from ir-keymaps.c 5 // 6 // Copyright (c) 2010 by Mauro Carvalho Chehab 7 8 #include <media/rc-map.h> 9 #include <linux/module.h> 10 11 /* Michael Tokarev <mjt@tls.msk.ru> 12 keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at 13 least, and probably other cards too. 14 The "ascii-art picture" below (in comments, first row 15 is the keycode in hex, and subsequent row(s) shows 16 the button labels (several variants when appropriate) 17 helps to decide which keycodes to assign to the buttons. 18 */ 19 20 static struct rc_map_table manli[] = { 21 22 /* 0x1c 0x12 * 23 * FUNCTION POWER * 24 * FM (|) * 25 * */ 26 { 0x1c, KEY_RADIO }, /*XXX*/ 27 { 0x12, KEY_POWER }, 28 29 /* 0x01 0x02 0x03 * 30 * 1 2 3 * 31 * * 32 * 0x04 0x05 0x06 * 33 * 4 5 6 * 34 * * 35 * 0x07 0x08 0x09 * 36 * 7 8 9 * 37 * */ 38 { 0x01, KEY_NUMERIC_1 }, 39 { 0x02, KEY_NUMERIC_2 }, 40 { 0x03, KEY_NUMERIC_3 }, 41 { 0x04, KEY_NUMERIC_4 }, 42 { 0x05, KEY_NUMERIC_5 }, 43 { 0x06, KEY_NUMERIC_6 }, 44 { 0x07, KEY_NUMERIC_7 }, 45 { 0x08, KEY_NUMERIC_8 }, 46 { 0x09, KEY_NUMERIC_9 }, 47 48 /* 0x0a 0x00 0x17 * 49 * RECALL 0 +100 * 50 * PLUS * 51 * */ 52 { 0x0a, KEY_AGAIN }, /*XXX KEY_REWIND? */ 53 { 0x00, KEY_NUMERIC_0 }, 54 { 0x17, KEY_DIGITS }, /*XXX*/ 55 56 /* 0x14 0x10 * 57 * MENU INFO * 58 * OSD */ 59 { 0x14, KEY_MENU }, 60 { 0x10, KEY_INFO }, 61 62 /* 0x0b * 63 * Up * 64 * * 65 * 0x18 0x16 0x0c * 66 * Left Ok Right * 67 * * 68 * 0x015 * 69 * Down * 70 * */ 71 { 0x0b, KEY_UP }, 72 { 0x18, KEY_LEFT }, 73 { 0x16, KEY_OK }, /*XXX KEY_SELECT? KEY_ENTER? */ 74 { 0x0c, KEY_RIGHT }, 75 { 0x15, KEY_DOWN }, 76 77 /* 0x11 0x0d * 78 * TV/AV MODE * 79 * SOURCE STEREO * 80 * */ 81 { 0x11, KEY_TV }, /*XXX*/ 82 { 0x0d, KEY_MODE }, /*XXX there's no KEY_STEREO */ 83 84 /* 0x0f 0x1b 0x1a * 85 * AUDIO Vol+ Chan+ * 86 * TIMESHIFT??? * 87 * * 88 * 0x0e 0x1f 0x1e * 89 * SLEEP Vol- Chan- * 90 * */ 91 { 0x0f, KEY_AUDIO }, 92 { 0x1b, KEY_VOLUMEUP }, 93 { 0x1a, KEY_CHANNELUP }, 94 { 0x0e, KEY_TIME }, 95 { 0x1f, KEY_VOLUMEDOWN }, 96 { 0x1e, KEY_CHANNELDOWN }, 97 98 /* 0x13 0x19 * 99 * MUTE SNAPSHOT* 100 * */ 101 { 0x13, KEY_MUTE }, 102 { 0x19, KEY_CAMERA }, 103 104 /* 0x1d unused ? */ 105 }; 106 107 static struct rc_map_list manli_map = { 108 .map = { 109 .scan = manli, 110 .size = ARRAY_SIZE(manli), 111 .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */ 112 .name = RC_MAP_MANLI, 113 } 114 }; 115 116 static int __init init_rc_map_manli(void) 117 { 118 return rc_map_register(&manli_map); 119 } 120 121 static void __exit exit_rc_map_manli(void) 122 { 123 rc_map_unregister(&manli_map); 124 } 125 126 module_init(init_rc_map_manli) 127 module_exit(exit_rc_map_manli) 128 129 MODULE_LICENSE("GPL"); 130 MODULE_AUTHOR("Mauro Carvalho Chehab"); 131