rc-lme2510.c (3040B)
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* LME2510 remote control 3 * 4 * Copyright (C) 2010 Malcolm Priestley (tvboxspy@gmail.com) 5 */ 6 7#include <media/rc-map.h> 8#include <linux/module.h> 9 10 11static struct rc_map_table lme2510_rc[] = { 12 /* Type 1 - 26 buttons */ 13 { 0xef12ba45, KEY_NUMERIC_0 }, 14 { 0xef12a05f, KEY_NUMERIC_1 }, 15 { 0xef12af50, KEY_NUMERIC_2 }, 16 { 0xef12a25d, KEY_NUMERIC_3 }, 17 { 0xef12be41, KEY_NUMERIC_4 }, 18 { 0xef12f50a, KEY_NUMERIC_5 }, 19 { 0xef12bd42, KEY_NUMERIC_6 }, 20 { 0xef12b847, KEY_NUMERIC_7 }, 21 { 0xef12b649, KEY_NUMERIC_8 }, 22 { 0xef12fa05, KEY_NUMERIC_9 }, 23 { 0xef12bc43, KEY_POWER }, 24 { 0xef12b946, KEY_SUBTITLE }, 25 { 0xef12f906, KEY_PAUSE }, 26 { 0xef12fc03, KEY_MEDIA_REPEAT}, 27 { 0xef12fd02, KEY_PAUSE }, 28 { 0xef12a15e, KEY_VOLUMEUP }, 29 { 0xef12a35c, KEY_VOLUMEDOWN }, 30 { 0xef12f609, KEY_CHANNELUP }, 31 { 0xef12e51a, KEY_CHANNELDOWN }, 32 { 0xef12e11e, KEY_PLAY }, 33 { 0xef12e41b, KEY_ZOOM }, 34 { 0xef12a659, KEY_MUTE }, 35 { 0xef12a55a, KEY_TV }, 36 { 0xef12e718, KEY_RECORD }, 37 { 0xef12f807, KEY_EPG }, 38 { 0xef12fe01, KEY_STOP }, 39 /* Type 2 - 20 buttons */ 40 { 0xff40ea15, KEY_NUMERIC_0 }, 41 { 0xff40f708, KEY_NUMERIC_1 }, 42 { 0xff40f609, KEY_NUMERIC_2 }, 43 { 0xff40f50a, KEY_NUMERIC_3 }, 44 { 0xff40f30c, KEY_NUMERIC_4 }, 45 { 0xff40f20d, KEY_NUMERIC_5 }, 46 { 0xff40f10e, KEY_NUMERIC_6 }, 47 { 0xff40ef10, KEY_NUMERIC_7 }, 48 { 0xff40ee11, KEY_NUMERIC_8 }, 49 { 0xff40ed12, KEY_NUMERIC_9 }, 50 { 0xff40ff00, KEY_POWER }, 51 { 0xff40fb04, KEY_MEDIA_REPEAT}, /* Recall */ 52 { 0xff40e51a, KEY_PAUSE }, /* Timeshift */ 53 { 0xff40fd02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 54 { 0xff40f906, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 55 { 0xff40fe01, KEY_CHANNELUP }, 56 { 0xff40fa05, KEY_CHANNELDOWN }, 57 { 0xff40eb14, KEY_ZOOM }, 58 { 0xff40e718, KEY_RECORD }, 59 { 0xff40e916, KEY_STOP }, 60 /* Type 3 - 20 buttons */ 61 { 0xff00e31c, KEY_NUMERIC_0 }, 62 { 0xff00f807, KEY_NUMERIC_1 }, 63 { 0xff00ea15, KEY_NUMERIC_2 }, 64 { 0xff00f609, KEY_NUMERIC_3 }, 65 { 0xff00e916, KEY_NUMERIC_4 }, 66 { 0xff00e619, KEY_NUMERIC_5 }, 67 { 0xff00f20d, KEY_NUMERIC_6 }, 68 { 0xff00f30c, KEY_NUMERIC_7 }, 69 { 0xff00e718, KEY_NUMERIC_8 }, 70 { 0xff00a15e, KEY_NUMERIC_9 }, 71 { 0xff00ba45, KEY_POWER }, 72 { 0xff00bb44, KEY_MEDIA_REPEAT}, /* Recall */ 73 { 0xff00b54a, KEY_PAUSE }, /* Timeshift */ 74 { 0xff00b847, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 75 { 0xff00bc43, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 76 { 0xff00b946, KEY_CHANNELUP }, 77 { 0xff00bf40, KEY_CHANNELDOWN }, 78 { 0xff00f708, KEY_ZOOM }, 79 { 0xff00bd42, KEY_RECORD }, 80 { 0xff00a55a, KEY_STOP }, 81}; 82 83static struct rc_map_list lme2510_map = { 84 .map = { 85 .scan = lme2510_rc, 86 .size = ARRAY_SIZE(lme2510_rc), 87 .rc_proto = RC_PROTO_NEC, 88 .name = RC_MAP_LME2510, 89 } 90}; 91 92static int __init init_rc_lme2510_map(void) 93{ 94 return rc_map_register(&lme2510_map); 95} 96 97static void __exit exit_rc_lme2510_map(void) 98{ 99 rc_map_unregister(&lme2510_map); 100} 101 102module_init(init_rc_lme2510_map) 103module_exit(exit_rc_lme2510_map) 104 105MODULE_LICENSE("GPL"); 106MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com");