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 8 #include <media/rc-map.h> 9 #include <linux/module.h> 10 11 static struct rc_map_table asus_ps3_100[] = { 12 { 0x081c, KEY_HOME }, /* home */ 13 { 0x081e, KEY_TV }, /* tv */ 14 { 0x0803, KEY_TEXT }, /* teletext */ 15 { 0x0829, KEY_POWER }, /* close */ 16 17 { 0x080b, KEY_RED }, /* red */ 18 { 0x080d, KEY_YELLOW }, /* yellow */ 19 { 0x0806, KEY_BLUE }, /* blue */ 20 { 0x0807, KEY_GREEN }, /* green */ 21 22 /* Keys 0 to 9 */ 23 { 0x082a, KEY_NUMERIC_0 }, 24 { 0x0816, KEY_NUMERIC_1 }, 25 { 0x0812, KEY_NUMERIC_2 }, 26 { 0x0814, KEY_NUMERIC_3 }, 27 { 0x0836, KEY_NUMERIC_4 }, 28 { 0x0832, KEY_NUMERIC_5 }, 29 { 0x0834, KEY_NUMERIC_6 }, 30 { 0x080e, KEY_NUMERIC_7 }, 31 { 0x080a, KEY_NUMERIC_8 }, 32 { 0x080c, KEY_NUMERIC_9 }, 33 34 { 0x0815, KEY_VOLUMEUP }, 35 { 0x0826, KEY_VOLUMEDOWN }, 36 { 0x0835, KEY_CHANNELUP }, /* channel / program + */ 37 { 0x0824, KEY_CHANNELDOWN }, /* channel / program - */ 38 39 { 0x0808, KEY_UP }, 40 { 0x0804, KEY_DOWN }, 41 { 0x0818, KEY_LEFT }, 42 { 0x0810, KEY_RIGHT }, 43 { 0x0825, KEY_ENTER }, /* enter */ 44 45 { 0x0822, KEY_EXIT }, /* back */ 46 { 0x082c, KEY_AB }, /* recall */ 47 48 { 0x0820, KEY_AUDIO }, /* TV audio */ 49 { 0x0837, KEY_SCREEN }, /* snapshot */ 50 { 0x082e, KEY_ZOOM }, /* full screen */ 51 { 0x0802, KEY_MUTE }, /* mute */ 52 53 { 0x0831, KEY_REWIND }, /* backward << */ 54 { 0x0811, KEY_RECORD }, /* recording */ 55 { 0x0809, KEY_STOP }, 56 { 0x0805, KEY_FASTFORWARD }, /* forward >> */ 57 { 0x0821, KEY_PREVIOUS }, /* rew */ 58 { 0x081a, KEY_PAUSE }, /* pause */ 59 { 0x0839, KEY_PLAY }, /* play */ 60 { 0x0819, KEY_NEXT }, /* forward */ 61 }; 62 63 static struct rc_map_list asus_ps3_100_map = { 64 .map = { 65 .scan = asus_ps3_100, 66 .size = ARRAY_SIZE(asus_ps3_100), 67 .rc_proto = RC_PROTO_RC5, 68 .name = RC_MAP_ASUS_PS3_100, 69 } 70 }; 71 72 static int __init init_rc_map_asus_ps3_100(void) 73 { 74 return rc_map_register(&asus_ps3_100_map); 75 } 76 77 static void __exit exit_rc_map_asus_ps3_100(void) 78 { 79 rc_map_unregister(&asus_ps3_100_map); 80 } 81 82 module_init(init_rc_map_asus_ps3_100) 83 module_exit(exit_rc_map_asus_ps3_100) 84 85 MODULE_LICENSE("GPL"); 86 MODULE_AUTHOR("Mauro Carvalho Chehab"); 87