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