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