1*2874c5fdSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later 232cf86f6SMauro Carvalho Chehab /* LME2510 remote control 332cf86f6SMauro Carvalho Chehab * 432cf86f6SMauro Carvalho Chehab * Copyright (C) 2010 Malcolm Priestley (tvboxspy@gmail.com) 532cf86f6SMauro Carvalho Chehab */ 632cf86f6SMauro Carvalho Chehab 732cf86f6SMauro Carvalho Chehab #include <media/rc-map.h> 87a707b89SPaul Gortmaker #include <linux/module.h> 932cf86f6SMauro Carvalho Chehab 1032cf86f6SMauro Carvalho Chehab 112f4f58d6SMauro Carvalho Chehab static struct rc_map_table lme2510_rc[] = { 124a1cba51SMalcolm Priestley /* Type 1 - 26 buttons */ 13f459aec2SDavid Härdeman { 0xef12ba45, KEY_0 }, 14f459aec2SDavid Härdeman { 0xef12a05f, KEY_1 }, 15f459aec2SDavid Härdeman { 0xef12af50, KEY_2 }, 16f459aec2SDavid Härdeman { 0xef12a25d, KEY_3 }, 17f459aec2SDavid Härdeman { 0xef12be41, KEY_4 }, 18f459aec2SDavid Härdeman { 0xef12f50a, KEY_5 }, 19f459aec2SDavid Härdeman { 0xef12bd42, KEY_6 }, 20f459aec2SDavid Härdeman { 0xef12b847, KEY_7 }, 21f459aec2SDavid Härdeman { 0xef12b649, KEY_8 }, 22f459aec2SDavid Härdeman { 0xef12fa05, KEY_9 }, 23f459aec2SDavid Härdeman { 0xef12bc43, KEY_POWER }, 24f459aec2SDavid Härdeman { 0xef12b946, KEY_SUBTITLE }, 25f459aec2SDavid Härdeman { 0xef12f906, KEY_PAUSE }, 26f459aec2SDavid Härdeman { 0xef12fc03, KEY_MEDIA_REPEAT}, 27f459aec2SDavid Härdeman { 0xef12fd02, KEY_PAUSE }, 28f459aec2SDavid Härdeman { 0xef12a15e, KEY_VOLUMEUP }, 29f459aec2SDavid Härdeman { 0xef12a35c, KEY_VOLUMEDOWN }, 30f459aec2SDavid Härdeman { 0xef12f609, KEY_CHANNELUP }, 31f459aec2SDavid Härdeman { 0xef12e51a, KEY_CHANNELDOWN }, 32f459aec2SDavid Härdeman { 0xef12e11e, KEY_PLAY }, 33f459aec2SDavid Härdeman { 0xef12e41b, KEY_ZOOM }, 34f459aec2SDavid Härdeman { 0xef12a659, KEY_MUTE }, 35f459aec2SDavid Härdeman { 0xef12a55a, KEY_TV }, 36f459aec2SDavid Härdeman { 0xef12e718, KEY_RECORD }, 37f459aec2SDavid Härdeman { 0xef12f807, KEY_EPG }, 38f459aec2SDavid Härdeman { 0xef12fe01, KEY_STOP }, 394a1cba51SMalcolm Priestley /* Type 2 - 20 buttons */ 40f459aec2SDavid Härdeman { 0xff40ea15, KEY_0 }, 41f459aec2SDavid Härdeman { 0xff40f708, KEY_1 }, 42f459aec2SDavid Härdeman { 0xff40f609, KEY_2 }, 43f459aec2SDavid Härdeman { 0xff40f50a, KEY_3 }, 44f459aec2SDavid Härdeman { 0xff40f30c, KEY_4 }, 45f459aec2SDavid Härdeman { 0xff40f20d, KEY_5 }, 46f459aec2SDavid Härdeman { 0xff40f10e, KEY_6 }, 47f459aec2SDavid Härdeman { 0xff40ef10, KEY_7 }, 48f459aec2SDavid Härdeman { 0xff40ee11, KEY_8 }, 49f459aec2SDavid Härdeman { 0xff40ed12, KEY_9 }, 50f459aec2SDavid Härdeman { 0xff40ff00, KEY_POWER }, 51f459aec2SDavid Härdeman { 0xff40fb04, KEY_MEDIA_REPEAT}, /* Recall */ 52f459aec2SDavid Härdeman { 0xff40e51a, KEY_PAUSE }, /* Timeshift */ 53f459aec2SDavid Härdeman { 0xff40fd02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 54f459aec2SDavid Härdeman { 0xff40f906, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 55f459aec2SDavid Härdeman { 0xff40fe01, KEY_CHANNELUP }, 56f459aec2SDavid Härdeman { 0xff40fa05, KEY_CHANNELDOWN }, 57f459aec2SDavid Härdeman { 0xff40eb14, KEY_ZOOM }, 58f459aec2SDavid Härdeman { 0xff40e718, KEY_RECORD }, 59f459aec2SDavid Härdeman { 0xff40e916, KEY_STOP }, 604a1cba51SMalcolm Priestley /* Type 3 - 20 buttons */ 61f459aec2SDavid Härdeman { 0xff00e31c, KEY_0 }, 62f459aec2SDavid Härdeman { 0xff00f807, KEY_1 }, 63f459aec2SDavid Härdeman { 0xff00ea15, KEY_2 }, 64f459aec2SDavid Härdeman { 0xff00f609, KEY_3 }, 65f459aec2SDavid Härdeman { 0xff00e916, KEY_4 }, 66f459aec2SDavid Härdeman { 0xff00e619, KEY_5 }, 67f459aec2SDavid Härdeman { 0xff00f20d, KEY_6 }, 68f459aec2SDavid Härdeman { 0xff00f30c, KEY_7 }, 69f459aec2SDavid Härdeman { 0xff00e718, KEY_8 }, 70f459aec2SDavid Härdeman { 0xff00a15e, KEY_9 }, 71f459aec2SDavid Härdeman { 0xff00ba45, KEY_POWER }, 72f459aec2SDavid Härdeman { 0xff00bb44, KEY_MEDIA_REPEAT}, /* Recall */ 73f459aec2SDavid Härdeman { 0xff00b54a, KEY_PAUSE }, /* Timeshift */ 74f459aec2SDavid Härdeman { 0xff00b847, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 75f459aec2SDavid Härdeman { 0xff00bc43, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 76f459aec2SDavid Härdeman { 0xff00b946, KEY_CHANNELUP }, 77f459aec2SDavid Härdeman { 0xff00bf40, KEY_CHANNELDOWN }, 78f459aec2SDavid Härdeman { 0xff00f708, KEY_ZOOM }, 79f459aec2SDavid Härdeman { 0xff00bd42, KEY_RECORD }, 80f459aec2SDavid Härdeman { 0xff00a55a, KEY_STOP }, 8132cf86f6SMauro Carvalho Chehab }; 8232cf86f6SMauro Carvalho Chehab 83d100e659SMauro Carvalho Chehab static struct rc_map_list lme2510_map = { 8432cf86f6SMauro Carvalho Chehab .map = { 8532cf86f6SMauro Carvalho Chehab .scan = lme2510_rc, 8632cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(lme2510_rc), 876d741bfeSSean Young .rc_proto = RC_PROTO_NEC, 8832cf86f6SMauro Carvalho Chehab .name = RC_MAP_LME2510, 8932cf86f6SMauro Carvalho Chehab } 9032cf86f6SMauro Carvalho Chehab }; 9132cf86f6SMauro Carvalho Chehab 9232cf86f6SMauro Carvalho Chehab static int __init init_rc_lme2510_map(void) 9332cf86f6SMauro Carvalho Chehab { 94d100e659SMauro Carvalho Chehab return rc_map_register(&lme2510_map); 9532cf86f6SMauro Carvalho Chehab } 9632cf86f6SMauro Carvalho Chehab 9732cf86f6SMauro Carvalho Chehab static void __exit exit_rc_lme2510_map(void) 9832cf86f6SMauro Carvalho Chehab { 99d100e659SMauro Carvalho Chehab rc_map_unregister(&lme2510_map); 10032cf86f6SMauro Carvalho Chehab } 10132cf86f6SMauro Carvalho Chehab 10232cf86f6SMauro Carvalho Chehab module_init(init_rc_lme2510_map) 10332cf86f6SMauro Carvalho Chehab module_exit(exit_rc_lme2510_map) 10432cf86f6SMauro Carvalho Chehab 10532cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL"); 10632cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com"); 107