1eb224c29SMalcolm Priestley /* ITE Generic remotes Version 1 2eb224c29SMalcolm Priestley * 3eb224c29SMalcolm Priestley * Copyright (C) 2012 Malcolm Priestley (tvboxspy@gmail.com) 4eb224c29SMalcolm Priestley * 5eb224c29SMalcolm Priestley * This program is free software; you can redistribute it and/or modify 6eb224c29SMalcolm Priestley * it under the terms of the GNU General Public License as published by 7eb224c29SMalcolm Priestley * the Free Software Foundation; either version 2 of the License, or 8eb224c29SMalcolm Priestley * (at your option) any later version. 9eb224c29SMalcolm Priestley */ 10eb224c29SMalcolm Priestley 11eb224c29SMalcolm Priestley #include <media/rc-map.h> 12eb224c29SMalcolm Priestley #include <linux/module.h> 13eb224c29SMalcolm Priestley 14eb224c29SMalcolm Priestley 15eb224c29SMalcolm Priestley static struct rc_map_table it913x_v1_rc[] = { 16eb224c29SMalcolm Priestley /* Type 1 */ 17eb224c29SMalcolm Priestley { 0x61d601, KEY_VIDEO }, /* Source */ 18eb224c29SMalcolm Priestley { 0x61d602, KEY_3 }, 19eb224c29SMalcolm Priestley { 0x61d603, KEY_POWER }, /* ShutDown */ 20eb224c29SMalcolm Priestley { 0x61d604, KEY_1 }, 21eb224c29SMalcolm Priestley { 0x61d605, KEY_5 }, 22eb224c29SMalcolm Priestley { 0x61d606, KEY_6 }, 23eb224c29SMalcolm Priestley { 0x61d607, KEY_CHANNELDOWN }, /* CH- */ 24eb224c29SMalcolm Priestley { 0x61d608, KEY_2 }, 25eb224c29SMalcolm Priestley { 0x61d609, KEY_CHANNELUP }, /* CH+ */ 26eb224c29SMalcolm Priestley { 0x61d60a, KEY_9 }, 27eb224c29SMalcolm Priestley { 0x61d60b, KEY_ZOOM }, /* Zoom */ 28eb224c29SMalcolm Priestley { 0x61d60c, KEY_7 }, 29eb224c29SMalcolm Priestley { 0x61d60d, KEY_8 }, 30eb224c29SMalcolm Priestley { 0x61d60e, KEY_VOLUMEUP }, /* Vol+ */ 31eb224c29SMalcolm Priestley { 0x61d60f, KEY_4 }, 32eb224c29SMalcolm Priestley { 0x61d610, KEY_ESC }, /* [back up arrow] */ 33eb224c29SMalcolm Priestley { 0x61d611, KEY_0 }, 34eb224c29SMalcolm Priestley { 0x61d612, KEY_OK }, /* [enter arrow] */ 35eb224c29SMalcolm Priestley { 0x61d613, KEY_VOLUMEDOWN }, /* Vol- */ 36eb224c29SMalcolm Priestley { 0x61d614, KEY_RECORD }, /* Rec */ 37eb224c29SMalcolm Priestley { 0x61d615, KEY_STOP }, /* Stop */ 38eb224c29SMalcolm Priestley { 0x61d616, KEY_PLAY }, /* Play */ 39eb224c29SMalcolm Priestley { 0x61d617, KEY_MUTE }, /* Mute */ 40eb224c29SMalcolm Priestley { 0x61d618, KEY_UP }, 41eb224c29SMalcolm Priestley { 0x61d619, KEY_DOWN }, 42eb224c29SMalcolm Priestley { 0x61d61a, KEY_LEFT }, 43eb224c29SMalcolm Priestley { 0x61d61b, KEY_RIGHT }, 44eb224c29SMalcolm Priestley { 0x61d61c, KEY_RED }, 45eb224c29SMalcolm Priestley { 0x61d61d, KEY_GREEN }, 46eb224c29SMalcolm Priestley { 0x61d61e, KEY_YELLOW }, 47eb224c29SMalcolm Priestley { 0x61d61f, KEY_BLUE }, 48eb224c29SMalcolm Priestley { 0x61d643, KEY_POWER2 }, /* [red power button] */ 49eb224c29SMalcolm Priestley /* Type 2 - 20 buttons */ 50eb224c29SMalcolm Priestley { 0x807f0d, KEY_0 }, 51eb224c29SMalcolm Priestley { 0x807f04, KEY_1 }, 52eb224c29SMalcolm Priestley { 0x807f05, KEY_2 }, 53eb224c29SMalcolm Priestley { 0x807f06, KEY_3 }, 54eb224c29SMalcolm Priestley { 0x807f07, KEY_4 }, 55eb224c29SMalcolm Priestley { 0x807f08, KEY_5 }, 56eb224c29SMalcolm Priestley { 0x807f09, KEY_6 }, 57eb224c29SMalcolm Priestley { 0x807f0a, KEY_7 }, 58eb224c29SMalcolm Priestley { 0x807f1b, KEY_8 }, 59eb224c29SMalcolm Priestley { 0x807f1f, KEY_9 }, 60eb224c29SMalcolm Priestley { 0x807f12, KEY_POWER }, 61eb224c29SMalcolm Priestley { 0x807f01, KEY_MEDIA_REPEAT}, /* Recall */ 62eb224c29SMalcolm Priestley { 0x807f19, KEY_PAUSE }, /* Timeshift */ 63eb224c29SMalcolm Priestley { 0x807f1e, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 64eb224c29SMalcolm Priestley { 0x807f03, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 65eb224c29SMalcolm Priestley { 0x807f1a, KEY_CHANNELUP }, 66eb224c29SMalcolm Priestley { 0x807f02, KEY_CHANNELDOWN }, 67eb224c29SMalcolm Priestley { 0x807f0c, KEY_ZOOM }, 68eb224c29SMalcolm Priestley { 0x807f00, KEY_RECORD }, 69eb224c29SMalcolm Priestley { 0x807f0e, KEY_STOP }, 70eb224c29SMalcolm Priestley }; 71eb224c29SMalcolm Priestley 72eb224c29SMalcolm Priestley static struct rc_map_list it913x_v1_map = { 73eb224c29SMalcolm Priestley .map = { 74eb224c29SMalcolm Priestley .scan = it913x_v1_rc, 75eb224c29SMalcolm Priestley .size = ARRAY_SIZE(it913x_v1_rc), 76*c5f14af0SSean Young .rc_proto = RC_PROTO_NECX, 77eb224c29SMalcolm Priestley .name = RC_MAP_IT913X_V1, 78eb224c29SMalcolm Priestley } 79eb224c29SMalcolm Priestley }; 80eb224c29SMalcolm Priestley 81eb224c29SMalcolm Priestley static int __init init_rc_it913x_v1_map(void) 82eb224c29SMalcolm Priestley { 83eb224c29SMalcolm Priestley return rc_map_register(&it913x_v1_map); 84eb224c29SMalcolm Priestley } 85eb224c29SMalcolm Priestley 86eb224c29SMalcolm Priestley static void __exit exit_rc_it913x_v1_map(void) 87eb224c29SMalcolm Priestley { 88eb224c29SMalcolm Priestley rc_map_unregister(&it913x_v1_map); 89eb224c29SMalcolm Priestley } 90eb224c29SMalcolm Priestley 91eb224c29SMalcolm Priestley module_init(init_rc_it913x_v1_map) 92eb224c29SMalcolm Priestley module_exit(exit_rc_it913x_v1_map) 93eb224c29SMalcolm Priestley 94eb224c29SMalcolm Priestley MODULE_LICENSE("GPL"); 95eb224c29SMalcolm Priestley MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com"); 96