1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Medion X10 RF remote keytable 4 * 5 * Copyright (C) 2011 Anssi Hannula <anssi.hannula@?ki.fi> 6 * 7 * This file is based on a keytable provided by 8 * Jan Losinski <losinski@wh2.tu-dresden.de> 9 */ 10 11 #include <linux/module.h> 12 #include <media/rc-map.h> 13 14 static struct rc_map_table medion_x10[] = { 15 { 0x2c, KEY_TV }, /* TV */ 16 { 0x2d, KEY_VCR }, /* VCR */ 17 { 0x04, KEY_DVD }, /* DVD */ 18 { 0x06, KEY_AUDIO }, /* MUSIC */ 19 20 { 0x2e, KEY_RADIO }, /* RADIO */ 21 { 0x05, KEY_DIRECTORY }, /* PHOTO */ 22 { 0x2f, KEY_INFO }, /* TV-PREVIEW */ 23 { 0x30, KEY_LIST }, /* CHANNEL-LST */ 24 25 { 0x1b, KEY_SETUP }, /* SETUP */ 26 { 0x31, KEY_VIDEO }, /* VIDEO DESKTOP */ 27 28 { 0x08, KEY_VOLUMEDOWN }, /* VOL - */ 29 { 0x09, KEY_VOLUMEUP }, /* VOL + */ 30 { 0x0b, KEY_CHANNELUP }, /* CHAN + */ 31 { 0x0c, KEY_CHANNELDOWN }, /* CHAN - */ 32 { 0x00, KEY_MUTE }, /* MUTE */ 33 34 { 0x32, KEY_RED }, /* red */ 35 { 0x33, KEY_GREEN }, /* green */ 36 { 0x34, KEY_YELLOW }, /* yellow */ 37 { 0x35, KEY_BLUE }, /* blue */ 38 { 0x16, KEY_TEXT }, /* TXT */ 39 40 { 0x0d, KEY_NUMERIC_1 }, 41 { 0x0e, KEY_NUMERIC_2 }, 42 { 0x0f, KEY_NUMERIC_3 }, 43 { 0x10, KEY_NUMERIC_4 }, 44 { 0x11, KEY_NUMERIC_5 }, 45 { 0x12, KEY_NUMERIC_6 }, 46 { 0x13, KEY_NUMERIC_7 }, 47 { 0x14, KEY_NUMERIC_8 }, 48 { 0x15, KEY_NUMERIC_9 }, 49 { 0x17, KEY_NUMERIC_0 }, 50 { 0x1c, KEY_SEARCH }, /* TV/RAD, CH SRC */ 51 { 0x20, KEY_DELETE }, /* DELETE */ 52 53 { 0x36, KEY_KEYBOARD }, /* RENAME */ 54 { 0x18, KEY_SCREEN }, /* SNAPSHOT */ 55 56 { 0x1a, KEY_UP }, /* up */ 57 { 0x22, KEY_DOWN }, /* down */ 58 { 0x1d, KEY_LEFT }, /* left */ 59 { 0x1f, KEY_RIGHT }, /* right */ 60 { 0x1e, KEY_OK }, /* OK */ 61 62 { 0x37, KEY_SELECT }, /* ACQUIRE IMAGE */ 63 { 0x38, KEY_EDIT }, /* EDIT IMAGE */ 64 65 { 0x24, KEY_REWIND }, /* rewind (<<) */ 66 { 0x25, KEY_PLAY }, /* play ( >) */ 67 { 0x26, KEY_FORWARD }, /* forward (>>) */ 68 { 0x27, KEY_RECORD }, /* record ( o) */ 69 { 0x28, KEY_STOP }, /* stop ([]) */ 70 { 0x29, KEY_PAUSE }, /* pause ('') */ 71 72 { 0x21, KEY_PREVIOUS }, /* prev */ 73 { 0x39, KEY_SWITCHVIDEOMODE }, /* F SCR */ 74 { 0x23, KEY_NEXT }, /* next */ 75 { 0x19, KEY_MENU }, /* MENU */ 76 { 0x3a, KEY_LANGUAGE }, /* AUDIO */ 77 78 { 0x02, KEY_POWER }, /* POWER */ 79 }; 80 81 static struct rc_map_list medion_x10_map = { 82 .map = { 83 .scan = medion_x10, 84 .size = ARRAY_SIZE(medion_x10), 85 .rc_proto = RC_PROTO_OTHER, 86 .name = RC_MAP_MEDION_X10, 87 } 88 }; 89 90 static int __init init_rc_map_medion_x10(void) 91 { 92 return rc_map_register(&medion_x10_map); 93 } 94 95 static void __exit exit_rc_map_medion_x10(void) 96 { 97 rc_map_unregister(&medion_x10_map); 98 } 99 100 module_init(init_rc_map_medion_x10) 101 module_exit(exit_rc_map_medion_x10) 102 103 MODULE_LICENSE("GPL"); 104 MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>"); 105 MODULE_DESCRIPTION("Medion X10 RF remote controller keytable"); 106