162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 262306a36Sopenharmony_ci/* ITE Generic remotes Version 1 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (C) 2012 Malcolm Priestley (tvboxspy@gmail.com) 562306a36Sopenharmony_ci */ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#include <media/rc-map.h> 862306a36Sopenharmony_ci#include <linux/module.h> 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_cistatic struct rc_map_table it913x_v1_rc[] = { 1262306a36Sopenharmony_ci /* Type 1 */ 1362306a36Sopenharmony_ci { 0x61d601, KEY_VIDEO }, /* Source */ 1462306a36Sopenharmony_ci { 0x61d602, KEY_NUMERIC_3 }, 1562306a36Sopenharmony_ci { 0x61d603, KEY_POWER }, /* ShutDown */ 1662306a36Sopenharmony_ci { 0x61d604, KEY_NUMERIC_1 }, 1762306a36Sopenharmony_ci { 0x61d605, KEY_NUMERIC_5 }, 1862306a36Sopenharmony_ci { 0x61d606, KEY_NUMERIC_6 }, 1962306a36Sopenharmony_ci { 0x61d607, KEY_CHANNELDOWN }, /* CH- */ 2062306a36Sopenharmony_ci { 0x61d608, KEY_NUMERIC_2 }, 2162306a36Sopenharmony_ci { 0x61d609, KEY_CHANNELUP }, /* CH+ */ 2262306a36Sopenharmony_ci { 0x61d60a, KEY_NUMERIC_9 }, 2362306a36Sopenharmony_ci { 0x61d60b, KEY_ZOOM }, /* Zoom */ 2462306a36Sopenharmony_ci { 0x61d60c, KEY_NUMERIC_7 }, 2562306a36Sopenharmony_ci { 0x61d60d, KEY_NUMERIC_8 }, 2662306a36Sopenharmony_ci { 0x61d60e, KEY_VOLUMEUP }, /* Vol+ */ 2762306a36Sopenharmony_ci { 0x61d60f, KEY_NUMERIC_4 }, 2862306a36Sopenharmony_ci { 0x61d610, KEY_ESC }, /* [back up arrow] */ 2962306a36Sopenharmony_ci { 0x61d611, KEY_NUMERIC_0 }, 3062306a36Sopenharmony_ci { 0x61d612, KEY_OK }, /* [enter arrow] */ 3162306a36Sopenharmony_ci { 0x61d613, KEY_VOLUMEDOWN }, /* Vol- */ 3262306a36Sopenharmony_ci { 0x61d614, KEY_RECORD }, /* Rec */ 3362306a36Sopenharmony_ci { 0x61d615, KEY_STOP }, /* Stop */ 3462306a36Sopenharmony_ci { 0x61d616, KEY_PLAY }, /* Play */ 3562306a36Sopenharmony_ci { 0x61d617, KEY_MUTE }, /* Mute */ 3662306a36Sopenharmony_ci { 0x61d618, KEY_UP }, 3762306a36Sopenharmony_ci { 0x61d619, KEY_DOWN }, 3862306a36Sopenharmony_ci { 0x61d61a, KEY_LEFT }, 3962306a36Sopenharmony_ci { 0x61d61b, KEY_RIGHT }, 4062306a36Sopenharmony_ci { 0x61d61c, KEY_RED }, 4162306a36Sopenharmony_ci { 0x61d61d, KEY_GREEN }, 4262306a36Sopenharmony_ci { 0x61d61e, KEY_YELLOW }, 4362306a36Sopenharmony_ci { 0x61d61f, KEY_BLUE }, 4462306a36Sopenharmony_ci { 0x61d643, KEY_POWER2 }, /* [red power button] */ 4562306a36Sopenharmony_ci /* Type 2 - 20 buttons */ 4662306a36Sopenharmony_ci { 0x807f0d, KEY_NUMERIC_0 }, 4762306a36Sopenharmony_ci { 0x807f04, KEY_NUMERIC_1 }, 4862306a36Sopenharmony_ci { 0x807f05, KEY_NUMERIC_2 }, 4962306a36Sopenharmony_ci { 0x807f06, KEY_NUMERIC_3 }, 5062306a36Sopenharmony_ci { 0x807f07, KEY_NUMERIC_4 }, 5162306a36Sopenharmony_ci { 0x807f08, KEY_NUMERIC_5 }, 5262306a36Sopenharmony_ci { 0x807f09, KEY_NUMERIC_6 }, 5362306a36Sopenharmony_ci { 0x807f0a, KEY_NUMERIC_7 }, 5462306a36Sopenharmony_ci { 0x807f1b, KEY_NUMERIC_8 }, 5562306a36Sopenharmony_ci { 0x807f1f, KEY_NUMERIC_9 }, 5662306a36Sopenharmony_ci { 0x807f12, KEY_POWER }, 5762306a36Sopenharmony_ci { 0x807f01, KEY_MEDIA_REPEAT}, /* Recall */ 5862306a36Sopenharmony_ci { 0x807f19, KEY_PAUSE }, /* Timeshift */ 5962306a36Sopenharmony_ci { 0x807f1e, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 6062306a36Sopenharmony_ci { 0x807f03, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 6162306a36Sopenharmony_ci { 0x807f1a, KEY_CHANNELUP }, 6262306a36Sopenharmony_ci { 0x807f02, KEY_CHANNELDOWN }, 6362306a36Sopenharmony_ci { 0x807f0c, KEY_ZOOM }, 6462306a36Sopenharmony_ci { 0x807f00, KEY_RECORD }, 6562306a36Sopenharmony_ci { 0x807f0e, KEY_STOP }, 6662306a36Sopenharmony_ci}; 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_cistatic struct rc_map_list it913x_v1_map = { 6962306a36Sopenharmony_ci .map = { 7062306a36Sopenharmony_ci .scan = it913x_v1_rc, 7162306a36Sopenharmony_ci .size = ARRAY_SIZE(it913x_v1_rc), 7262306a36Sopenharmony_ci .rc_proto = RC_PROTO_NECX, 7362306a36Sopenharmony_ci .name = RC_MAP_IT913X_V1, 7462306a36Sopenharmony_ci } 7562306a36Sopenharmony_ci}; 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_cistatic int __init init_rc_it913x_v1_map(void) 7862306a36Sopenharmony_ci{ 7962306a36Sopenharmony_ci return rc_map_register(&it913x_v1_map); 8062306a36Sopenharmony_ci} 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_cistatic void __exit exit_rc_it913x_v1_map(void) 8362306a36Sopenharmony_ci{ 8462306a36Sopenharmony_ci rc_map_unregister(&it913x_v1_map); 8562306a36Sopenharmony_ci} 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_cimodule_init(init_rc_it913x_v1_map) 8862306a36Sopenharmony_cimodule_exit(exit_rc_it913x_v1_map) 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ciMODULE_LICENSE("GPL"); 9162306a36Sopenharmony_ciMODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com"); 92