1 /* 2 * DigitalNow TinyTwin remote controller keytable 3 * 4 * Copyright (C) 2010 Antti Palosaari <crope@iki.fi> 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 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License along 17 * with this program; if not, write to the Free Software Foundation, Inc., 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 */ 20 21 #include <media/rc-map.h> 22 #include <linux/module.h> 23 24 static struct rc_map_table digitalnow_tinytwin[] = { 25 { 0x0000, KEY_MUTE }, /* [symbol speaker] */ 26 { 0x0001, KEY_VOLUMEUP }, 27 { 0x0002, KEY_POWER2 }, /* TV [power button] */ 28 { 0x0003, KEY_2 }, 29 { 0x0004, KEY_3 }, 30 { 0x0005, KEY_4 }, 31 { 0x0006, KEY_6 }, 32 { 0x0007, KEY_7 }, 33 { 0x0008, KEY_8 }, 34 { 0x0009, KEY_NUMERIC_STAR }, /* [*] */ 35 { 0x000a, KEY_0 }, 36 { 0x000b, KEY_NUMERIC_POUND }, /* [#] */ 37 { 0x000c, KEY_RIGHT }, /* [right arrow] */ 38 { 0x000d, KEY_HOMEPAGE }, /* [symbol home] Start */ 39 { 0x000e, KEY_RED }, /* [red] Videos */ 40 { 0x0010, KEY_POWER }, /* PC [power button] */ 41 { 0x0011, KEY_YELLOW }, /* [yellow] Pictures */ 42 { 0x0012, KEY_DOWN }, /* [down arrow] */ 43 { 0x0013, KEY_GREEN }, /* [green] Music */ 44 { 0x0014, KEY_CYCLEWINDOWS }, /* BACK */ 45 { 0x0015, KEY_FAVORITES }, /* MORE */ 46 { 0x0016, KEY_UP }, /* [up arrow] */ 47 { 0x0017, KEY_LEFT }, /* [left arrow] */ 48 { 0x0018, KEY_OK }, /* OK */ 49 { 0x0019, KEY_BLUE }, /* [blue] MyTV */ 50 { 0x001a, KEY_REWIND }, /* REW [<<] */ 51 { 0x001b, KEY_PLAY }, /* PLAY */ 52 { 0x001c, KEY_5 }, 53 { 0x001d, KEY_9 }, 54 { 0x001e, KEY_VOLUMEDOWN }, 55 { 0x001f, KEY_1 }, 56 { 0x0040, KEY_STOP }, /* STOP */ 57 { 0x0042, KEY_PAUSE }, /* PAUSE */ 58 { 0x0043, KEY_SCREEN }, /* Aspect */ 59 { 0x0044, KEY_FORWARD }, /* FWD [>>] */ 60 { 0x0045, KEY_NEXT }, /* SKIP */ 61 { 0x0048, KEY_RECORD }, /* RECORD */ 62 { 0x0049, KEY_VIDEO }, /* RTV */ 63 { 0x004a, KEY_EPG }, /* Guide */ 64 { 0x004b, KEY_CHANNELUP }, 65 { 0x004c, KEY_HELP }, /* Help */ 66 { 0x004d, KEY_RADIO }, /* Radio */ 67 { 0x004f, KEY_CHANNELDOWN }, 68 { 0x0050, KEY_DVD }, /* DVD */ 69 { 0x0051, KEY_AUDIO }, /* Audio */ 70 { 0x0052, KEY_TITLE }, /* Title */ 71 { 0x0053, KEY_NEW }, /* [symbol PIP?] */ 72 { 0x0057, KEY_MENU }, /* Mouse */ 73 { 0x005a, KEY_PREVIOUS }, /* REPLAY */ 74 }; 75 76 static struct rc_map_list digitalnow_tinytwin_map = { 77 .map = { 78 .scan = digitalnow_tinytwin, 79 .size = ARRAY_SIZE(digitalnow_tinytwin), 80 .rc_type = RC_TYPE_NEC, 81 .name = RC_MAP_DIGITALNOW_TINYTWIN, 82 } 83 }; 84 85 static int __init init_rc_map_digitalnow_tinytwin(void) 86 { 87 return rc_map_register(&digitalnow_tinytwin_map); 88 } 89 90 static void __exit exit_rc_map_digitalnow_tinytwin(void) 91 { 92 rc_map_unregister(&digitalnow_tinytwin_map); 93 } 94 95 module_init(init_rc_map_digitalnow_tinytwin) 96 module_exit(exit_rc_map_digitalnow_tinytwin) 97 98 MODULE_LICENSE("GPL"); 99 MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>"); 100