132cf86f6SMauro Carvalho Chehab /* 232cf86f6SMauro Carvalho Chehab * LeadTek Y04G0051 remote controller keytable 332cf86f6SMauro Carvalho Chehab * 432cf86f6SMauro Carvalho Chehab * Copyright (C) 2010 Antti Palosaari <crope@iki.fi> 532cf86f6SMauro Carvalho Chehab * 632cf86f6SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify 732cf86f6SMauro Carvalho Chehab * it under the terms of the GNU General Public License as published by 832cf86f6SMauro Carvalho Chehab * the Free Software Foundation; either version 2 of the License, or 932cf86f6SMauro Carvalho Chehab * (at your option) any later version. 1032cf86f6SMauro Carvalho Chehab * 1132cf86f6SMauro Carvalho Chehab * This program is distributed in the hope that it will be useful, 1232cf86f6SMauro Carvalho Chehab * but WITHOUT ANY WARRANTY; without even the implied warranty of 1332cf86f6SMauro Carvalho Chehab * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1432cf86f6SMauro Carvalho Chehab * GNU General Public License for more details. 1532cf86f6SMauro Carvalho Chehab * 1632cf86f6SMauro Carvalho Chehab * You should have received a copy of the GNU General Public License along 1732cf86f6SMauro Carvalho Chehab * with this program; if not, write to the Free Software Foundation, Inc., 1832cf86f6SMauro Carvalho Chehab * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 1932cf86f6SMauro Carvalho Chehab */ 2032cf86f6SMauro Carvalho Chehab 2132cf86f6SMauro Carvalho Chehab #include <media/rc-map.h> 2232cf86f6SMauro Carvalho Chehab 2332cf86f6SMauro Carvalho Chehab static struct ir_scancode leadtek_y04g0051[] = { 2432cf86f6SMauro Carvalho Chehab { 0x0300, KEY_POWER2 }, 2532cf86f6SMauro Carvalho Chehab { 0x0303, KEY_SCREEN }, 2632cf86f6SMauro Carvalho Chehab { 0x0304, KEY_RIGHT }, 2732cf86f6SMauro Carvalho Chehab { 0x0305, KEY_1 }, 2832cf86f6SMauro Carvalho Chehab { 0x0306, KEY_2 }, 2932cf86f6SMauro Carvalho Chehab { 0x0307, KEY_3 }, 3032cf86f6SMauro Carvalho Chehab { 0x0308, KEY_LEFT }, 3132cf86f6SMauro Carvalho Chehab { 0x0309, KEY_4 }, 3232cf86f6SMauro Carvalho Chehab { 0x030a, KEY_5 }, 3332cf86f6SMauro Carvalho Chehab { 0x030b, KEY_6 }, 3432cf86f6SMauro Carvalho Chehab { 0x030c, KEY_UP }, 3532cf86f6SMauro Carvalho Chehab { 0x030d, KEY_7 }, 3632cf86f6SMauro Carvalho Chehab { 0x030e, KEY_8 }, 3732cf86f6SMauro Carvalho Chehab { 0x030f, KEY_9 }, 3832cf86f6SMauro Carvalho Chehab { 0x0310, KEY_DOWN }, 3932cf86f6SMauro Carvalho Chehab { 0x0311, KEY_AGAIN }, 4032cf86f6SMauro Carvalho Chehab { 0x0312, KEY_0 }, 4132cf86f6SMauro Carvalho Chehab { 0x0313, KEY_OK }, /* 1st ok */ 4232cf86f6SMauro Carvalho Chehab { 0x0314, KEY_MUTE }, 4332cf86f6SMauro Carvalho Chehab { 0x0316, KEY_OK }, /* 2nd ok */ 4432cf86f6SMauro Carvalho Chehab { 0x031e, KEY_VIDEO }, /* 2nd video */ 4532cf86f6SMauro Carvalho Chehab { 0x031b, KEY_AUDIO }, 4632cf86f6SMauro Carvalho Chehab { 0x031f, KEY_TEXT }, 4732cf86f6SMauro Carvalho Chehab { 0x0340, KEY_SLEEP }, 4832cf86f6SMauro Carvalho Chehab { 0x0341, KEY_DOT }, 4932cf86f6SMauro Carvalho Chehab { 0x0342, KEY_REWIND }, 5032cf86f6SMauro Carvalho Chehab { 0x0343, KEY_PLAY }, 5132cf86f6SMauro Carvalho Chehab { 0x0344, KEY_FASTFORWARD }, 5232cf86f6SMauro Carvalho Chehab { 0x0345, KEY_TIME }, 5332cf86f6SMauro Carvalho Chehab { 0x0346, KEY_STOP }, /* 2nd stop */ 5432cf86f6SMauro Carvalho Chehab { 0x0347, KEY_RECORD }, 5532cf86f6SMauro Carvalho Chehab { 0x0348, KEY_CAMERA }, 5632cf86f6SMauro Carvalho Chehab { 0x0349, KEY_ESC }, 5732cf86f6SMauro Carvalho Chehab { 0x034a, KEY_NEW }, 5832cf86f6SMauro Carvalho Chehab { 0x034b, KEY_RED }, 5932cf86f6SMauro Carvalho Chehab { 0x034c, KEY_GREEN }, 6032cf86f6SMauro Carvalho Chehab { 0x034d, KEY_YELLOW }, 6132cf86f6SMauro Carvalho Chehab { 0x034e, KEY_BLUE }, 6232cf86f6SMauro Carvalho Chehab { 0x034f, KEY_MENU }, 6332cf86f6SMauro Carvalho Chehab { 0x0350, KEY_STOP }, /* 1st stop */ 6432cf86f6SMauro Carvalho Chehab { 0x0351, KEY_CHANNEL }, 6532cf86f6SMauro Carvalho Chehab { 0x0352, KEY_VIDEO }, /* 1st video */ 6632cf86f6SMauro Carvalho Chehab { 0x0353, KEY_EPG }, 6732cf86f6SMauro Carvalho Chehab { 0x0354, KEY_PREVIOUS }, 6832cf86f6SMauro Carvalho Chehab { 0x0355, KEY_NEXT }, 6932cf86f6SMauro Carvalho Chehab { 0x0356, KEY_TV }, 7032cf86f6SMauro Carvalho Chehab { 0x035a, KEY_VOLUMEDOWN }, 7132cf86f6SMauro Carvalho Chehab { 0x035b, KEY_CHANNELUP }, 7232cf86f6SMauro Carvalho Chehab { 0x035e, KEY_VOLUMEUP }, 7332cf86f6SMauro Carvalho Chehab { 0x035f, KEY_CHANNELDOWN }, 7432cf86f6SMauro Carvalho Chehab }; 7532cf86f6SMauro Carvalho Chehab 7632cf86f6SMauro Carvalho Chehab static struct rc_keymap leadtek_y04g0051_map = { 7732cf86f6SMauro Carvalho Chehab .map = { 7832cf86f6SMauro Carvalho Chehab .scan = leadtek_y04g0051, 7932cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(leadtek_y04g0051), 8052b66144SMauro Carvalho Chehab .rc_type = RC_TYPE_NEC, 8132cf86f6SMauro Carvalho Chehab .name = RC_MAP_LEADTEK_Y04G0051, 8232cf86f6SMauro Carvalho Chehab } 8332cf86f6SMauro Carvalho Chehab }; 8432cf86f6SMauro Carvalho Chehab 8532cf86f6SMauro Carvalho Chehab static int __init init_rc_map_leadtek_y04g0051(void) 8632cf86f6SMauro Carvalho Chehab { 8732cf86f6SMauro Carvalho Chehab return ir_register_map(&leadtek_y04g0051_map); 8832cf86f6SMauro Carvalho Chehab } 8932cf86f6SMauro Carvalho Chehab 9032cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_leadtek_y04g0051(void) 9132cf86f6SMauro Carvalho Chehab { 9232cf86f6SMauro Carvalho Chehab ir_unregister_map(&leadtek_y04g0051_map); 9332cf86f6SMauro Carvalho Chehab } 9432cf86f6SMauro Carvalho Chehab 9532cf86f6SMauro Carvalho Chehab module_init(init_rc_map_leadtek_y04g0051) 9632cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_leadtek_y04g0051) 9732cf86f6SMauro Carvalho Chehab 9832cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL"); 9932cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>"); 100