Linux 3.11-rc3
[cris-mirror.git] / drivers / media / rc / keymaps / rc-msi-tvanywhere-plus.c
blobc393d8a50bcaad13ad33b8c96dae1c0ab4356e19
1 /* msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus Remote Controller
3 * keymap imported from ir-keymaps.c
5 * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
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.
13 #include <media/rc-map.h>
14 #include <linux/module.h>
17 Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
18 is marked "KS003". The controller is I2C at address 0x30, but does not seem
19 to respond to probes until a read is performed from a valid device.
20 I don't know why...
22 Note: This remote may be of similar or identical design to the
23 Pixelview remote (?). The raw codes and duplicate button codes
24 appear to be the same.
26 Henry Wong <henry@stuffedcow.net>
27 Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com>
30 static struct rc_map_table msi_tvanywhere_plus[] = {
32 /* ---- Remote Button Layout ----
34 POWER SOURCE SCAN MUTE
35 TV/FM 1 2 3
36 |> 4 5 6
37 <| 7 8 9
38 ^^UP 0 + RECALL
39 vvDN RECORD STOP PLAY
41 MINIMIZE ZOOM
43 CH+
44 VOL- VOL+
45 CH-
47 SNAPSHOT MTS
49 << FUNC >> RESET
52 { 0x01, KEY_1 }, /* 1 */
53 { 0x0b, KEY_2 }, /* 2 */
54 { 0x1b, KEY_3 }, /* 3 */
55 { 0x05, KEY_4 }, /* 4 */
56 { 0x09, KEY_5 }, /* 5 */
57 { 0x15, KEY_6 }, /* 6 */
58 { 0x06, KEY_7 }, /* 7 */
59 { 0x0a, KEY_8 }, /* 8 */
60 { 0x12, KEY_9 }, /* 9 */
61 { 0x02, KEY_0 }, /* 0 */
62 { 0x10, KEY_KPPLUS }, /* + */
63 { 0x13, KEY_AGAIN }, /* Recall */
65 { 0x1e, KEY_POWER }, /* Power */
66 { 0x07, KEY_VIDEO }, /* Source */
67 { 0x1c, KEY_SEARCH }, /* Scan */
68 { 0x18, KEY_MUTE }, /* Mute */
70 { 0x03, KEY_RADIO }, /* TV/FM */
71 /* The next four keys are duplicates that appear to send the
72 same IR code as Ch+, Ch-, >>, and << . The raw code assigned
73 to them is the actual code + 0x20 - they will never be
74 detected as such unless some way is discovered to distinguish
75 these buttons from those that have the same code. */
76 { 0x3f, KEY_RIGHT }, /* |> and Ch+ */
77 { 0x37, KEY_LEFT }, /* <| and Ch- */
78 { 0x2c, KEY_UP }, /* ^^Up and >> */
79 { 0x24, KEY_DOWN }, /* vvDn and << */
81 { 0x00, KEY_RECORD }, /* Record */
82 { 0x08, KEY_STOP }, /* Stop */
83 { 0x11, KEY_PLAY }, /* Play */
85 { 0x0f, KEY_CLOSE }, /* Minimize */
86 { 0x19, KEY_ZOOM }, /* Zoom */
87 { 0x1a, KEY_CAMERA }, /* Snapshot */
88 { 0x0d, KEY_LANGUAGE }, /* MTS */
90 { 0x14, KEY_VOLUMEDOWN }, /* Vol- */
91 { 0x16, KEY_VOLUMEUP }, /* Vol+ */
92 { 0x17, KEY_CHANNELDOWN }, /* Ch- */
93 { 0x1f, KEY_CHANNELUP }, /* Ch+ */
95 { 0x04, KEY_REWIND }, /* << */
96 { 0x0e, KEY_MENU }, /* Function */
97 { 0x0c, KEY_FASTFORWARD }, /* >> */
98 { 0x1d, KEY_RESTART }, /* Reset */
101 static struct rc_map_list msi_tvanywhere_plus_map = {
102 .map = {
103 .scan = msi_tvanywhere_plus,
104 .size = ARRAY_SIZE(msi_tvanywhere_plus),
105 .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */
106 .name = RC_MAP_MSI_TVANYWHERE_PLUS,
110 static int __init init_rc_map_msi_tvanywhere_plus(void)
112 return rc_map_register(&msi_tvanywhere_plus_map);
115 static void __exit exit_rc_map_msi_tvanywhere_plus(void)
117 rc_map_unregister(&msi_tvanywhere_plus_map);
120 module_init(init_rc_map_msi_tvanywhere_plus)
121 module_exit(exit_rc_map_msi_tvanywhere_plus)
123 MODULE_LICENSE("GPL");
124 MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");