1*32cf86f6SMauro Carvalho Chehab /* kworld-plus-tv-analog.h - Keytable for kworld_plus_tv_analog Remote Controller 2*32cf86f6SMauro Carvalho Chehab * 3*32cf86f6SMauro Carvalho Chehab * keymap imported from ir-keymaps.c 4*32cf86f6SMauro Carvalho Chehab * 5*32cf86f6SMauro Carvalho Chehab * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com> 6*32cf86f6SMauro Carvalho Chehab * 7*32cf86f6SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify 8*32cf86f6SMauro Carvalho Chehab * it under the terms of the GNU General Public License as published by 9*32cf86f6SMauro Carvalho Chehab * the Free Software Foundation; either version 2 of the License, or 10*32cf86f6SMauro Carvalho Chehab * (at your option) any later version. 11*32cf86f6SMauro Carvalho Chehab */ 12*32cf86f6SMauro Carvalho Chehab 13*32cf86f6SMauro Carvalho Chehab #include <media/rc-map.h> 14*32cf86f6SMauro Carvalho Chehab 15*32cf86f6SMauro Carvalho Chehab /* Kworld Plus TV Analog Lite PCI IR 16*32cf86f6SMauro Carvalho Chehab Mauro Carvalho Chehab <mchehab@infradead.org> 17*32cf86f6SMauro Carvalho Chehab */ 18*32cf86f6SMauro Carvalho Chehab 19*32cf86f6SMauro Carvalho Chehab static struct ir_scancode kworld_plus_tv_analog[] = { 20*32cf86f6SMauro Carvalho Chehab { 0x0c, KEY_PROG1 }, /* Kworld key */ 21*32cf86f6SMauro Carvalho Chehab { 0x16, KEY_CLOSECD }, /* -> ) */ 22*32cf86f6SMauro Carvalho Chehab { 0x1d, KEY_POWER2 }, 23*32cf86f6SMauro Carvalho Chehab 24*32cf86f6SMauro Carvalho Chehab { 0x00, KEY_1 }, 25*32cf86f6SMauro Carvalho Chehab { 0x01, KEY_2 }, 26*32cf86f6SMauro Carvalho Chehab { 0x02, KEY_3 }, /* Two keys have the same code: 3 and left */ 27*32cf86f6SMauro Carvalho Chehab { 0x03, KEY_4 }, /* Two keys have the same code: 3 and right */ 28*32cf86f6SMauro Carvalho Chehab { 0x04, KEY_5 }, 29*32cf86f6SMauro Carvalho Chehab { 0x05, KEY_6 }, 30*32cf86f6SMauro Carvalho Chehab { 0x06, KEY_7 }, 31*32cf86f6SMauro Carvalho Chehab { 0x07, KEY_8 }, 32*32cf86f6SMauro Carvalho Chehab { 0x08, KEY_9 }, 33*32cf86f6SMauro Carvalho Chehab { 0x0a, KEY_0 }, 34*32cf86f6SMauro Carvalho Chehab 35*32cf86f6SMauro Carvalho Chehab { 0x09, KEY_AGAIN }, 36*32cf86f6SMauro Carvalho Chehab { 0x14, KEY_MUTE }, 37*32cf86f6SMauro Carvalho Chehab 38*32cf86f6SMauro Carvalho Chehab { 0x20, KEY_UP }, 39*32cf86f6SMauro Carvalho Chehab { 0x21, KEY_DOWN }, 40*32cf86f6SMauro Carvalho Chehab { 0x0b, KEY_ENTER }, 41*32cf86f6SMauro Carvalho Chehab 42*32cf86f6SMauro Carvalho Chehab { 0x10, KEY_CHANNELUP }, 43*32cf86f6SMauro Carvalho Chehab { 0x11, KEY_CHANNELDOWN }, 44*32cf86f6SMauro Carvalho Chehab 45*32cf86f6SMauro Carvalho Chehab /* Couldn't map key left/key right since those 46*32cf86f6SMauro Carvalho Chehab conflict with '3' and '4' scancodes 47*32cf86f6SMauro Carvalho Chehab I dunno what the original driver does 48*32cf86f6SMauro Carvalho Chehab */ 49*32cf86f6SMauro Carvalho Chehab 50*32cf86f6SMauro Carvalho Chehab { 0x13, KEY_VOLUMEUP }, 51*32cf86f6SMauro Carvalho Chehab { 0x12, KEY_VOLUMEDOWN }, 52*32cf86f6SMauro Carvalho Chehab 53*32cf86f6SMauro Carvalho Chehab /* The lower part of the IR 54*32cf86f6SMauro Carvalho Chehab There are several duplicated keycodes there. 55*32cf86f6SMauro Carvalho Chehab Most of them conflict with digits. 56*32cf86f6SMauro Carvalho Chehab Add mappings just to the unused scancodes. 57*32cf86f6SMauro Carvalho Chehab Somehow, the original driver has a way to know, 58*32cf86f6SMauro Carvalho Chehab but this doesn't seem to be on some GPIO. 59*32cf86f6SMauro Carvalho Chehab Also, it is not related to the time between keyup 60*32cf86f6SMauro Carvalho Chehab and keydown. 61*32cf86f6SMauro Carvalho Chehab */ 62*32cf86f6SMauro Carvalho Chehab { 0x19, KEY_TIME}, /* Timeshift */ 63*32cf86f6SMauro Carvalho Chehab { 0x1a, KEY_STOP}, 64*32cf86f6SMauro Carvalho Chehab { 0x1b, KEY_RECORD}, 65*32cf86f6SMauro Carvalho Chehab 66*32cf86f6SMauro Carvalho Chehab { 0x22, KEY_TEXT}, 67*32cf86f6SMauro Carvalho Chehab 68*32cf86f6SMauro Carvalho Chehab { 0x15, KEY_AUDIO}, /* ((*)) */ 69*32cf86f6SMauro Carvalho Chehab { 0x0f, KEY_ZOOM}, 70*32cf86f6SMauro Carvalho Chehab { 0x1c, KEY_CAMERA}, /* snapshot */ 71*32cf86f6SMauro Carvalho Chehab 72*32cf86f6SMauro Carvalho Chehab { 0x18, KEY_RED}, /* B */ 73*32cf86f6SMauro Carvalho Chehab { 0x23, KEY_GREEN}, /* C */ 74*32cf86f6SMauro Carvalho Chehab }; 75*32cf86f6SMauro Carvalho Chehab 76*32cf86f6SMauro Carvalho Chehab static struct rc_keymap kworld_plus_tv_analog_map = { 77*32cf86f6SMauro Carvalho Chehab .map = { 78*32cf86f6SMauro Carvalho Chehab .scan = kworld_plus_tv_analog, 79*32cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(kworld_plus_tv_analog), 80*32cf86f6SMauro Carvalho Chehab .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ 81*32cf86f6SMauro Carvalho Chehab .name = RC_MAP_KWORLD_PLUS_TV_ANALOG, 82*32cf86f6SMauro Carvalho Chehab } 83*32cf86f6SMauro Carvalho Chehab }; 84*32cf86f6SMauro Carvalho Chehab 85*32cf86f6SMauro Carvalho Chehab static int __init init_rc_map_kworld_plus_tv_analog(void) 86*32cf86f6SMauro Carvalho Chehab { 87*32cf86f6SMauro Carvalho Chehab return ir_register_map(&kworld_plus_tv_analog_map); 88*32cf86f6SMauro Carvalho Chehab } 89*32cf86f6SMauro Carvalho Chehab 90*32cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_kworld_plus_tv_analog(void) 91*32cf86f6SMauro Carvalho Chehab { 92*32cf86f6SMauro Carvalho Chehab ir_unregister_map(&kworld_plus_tv_analog_map); 93*32cf86f6SMauro Carvalho Chehab } 94*32cf86f6SMauro Carvalho Chehab 95*32cf86f6SMauro Carvalho Chehab module_init(init_rc_map_kworld_plus_tv_analog) 96*32cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_kworld_plus_tv_analog) 97*32cf86f6SMauro Carvalho Chehab 98*32cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL"); 99*32cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); 100