Path: blob/master/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
15157 views
/* kworld-plus-tv-analog.h - Keytable for kworld_plus_tv_analog Remote Controller1*2* keymap imported from ir-keymaps.c3*4* Copyright (c) 2010 by Mauro Carvalho Chehab <[email protected]>5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License as published by8* the Free Software Foundation; either version 2 of the License, or9* (at your option) any later version.10*/1112#include <media/rc-map.h>1314/* Kworld Plus TV Analog Lite PCI IR15Mauro Carvalho Chehab <[email protected]>16*/1718static struct rc_map_table kworld_plus_tv_analog[] = {19{ 0x0c, KEY_MEDIA }, /* Kworld key */20{ 0x16, KEY_CLOSECD }, /* -> ) */21{ 0x1d, KEY_POWER2 },2223{ 0x00, KEY_1 },24{ 0x01, KEY_2 },25{ 0x02, KEY_3 }, /* Two keys have the same code: 3 and left */26{ 0x03, KEY_4 }, /* Two keys have the same code: 3 and right */27{ 0x04, KEY_5 },28{ 0x05, KEY_6 },29{ 0x06, KEY_7 },30{ 0x07, KEY_8 },31{ 0x08, KEY_9 },32{ 0x0a, KEY_0 },3334{ 0x09, KEY_AGAIN },35{ 0x14, KEY_MUTE },3637{ 0x20, KEY_UP },38{ 0x21, KEY_DOWN },39{ 0x0b, KEY_ENTER },4041{ 0x10, KEY_CHANNELUP },42{ 0x11, KEY_CHANNELDOWN },4344/* Couldn't map key left/key right since those45conflict with '3' and '4' scancodes46I dunno what the original driver does47*/4849{ 0x13, KEY_VOLUMEUP },50{ 0x12, KEY_VOLUMEDOWN },5152/* The lower part of the IR53There are several duplicated keycodes there.54Most of them conflict with digits.55Add mappings just to the unused scancodes.56Somehow, the original driver has a way to know,57but this doesn't seem to be on some GPIO.58Also, it is not related to the time between keyup59and keydown.60*/61{ 0x19, KEY_TIME}, /* Timeshift */62{ 0x1a, KEY_STOP},63{ 0x1b, KEY_RECORD},6465{ 0x22, KEY_TEXT},6667{ 0x15, KEY_AUDIO}, /* ((*)) */68{ 0x0f, KEY_ZOOM},69{ 0x1c, KEY_CAMERA}, /* snapshot */7071{ 0x18, KEY_RED}, /* B */72{ 0x23, KEY_GREEN}, /* C */73};7475static struct rc_map_list kworld_plus_tv_analog_map = {76.map = {77.scan = kworld_plus_tv_analog,78.size = ARRAY_SIZE(kworld_plus_tv_analog),79.rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */80.name = RC_MAP_KWORLD_PLUS_TV_ANALOG,81}82};8384static int __init init_rc_map_kworld_plus_tv_analog(void)85{86return rc_map_register(&kworld_plus_tv_analog_map);87}8889static void __exit exit_rc_map_kworld_plus_tv_analog(void)90{91rc_map_unregister(&kworld_plus_tv_analog_map);92}9394module_init(init_rc_map_kworld_plus_tv_analog)95module_exit(exit_rc_map_kworld_plus_tv_analog)9697MODULE_LICENSE("GPL");98MODULE_AUTHOR("Mauro Carvalho Chehab <[email protected]>");99100101