upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / media / IR / keymaps / rc-tbs-nec.c
1 /* tbs-nec.h - Keytable for tbs_nec 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 static struct ir_scancode tbs_nec[] = {
16         { 0x04, KEY_POWER2},    /*power*/
17         { 0x14, KEY_MUTE},      /*mute*/
18         { 0x07, KEY_1},
19         { 0x06, KEY_2},
20         { 0x05, KEY_3},
21         { 0x0b, KEY_4},
22         { 0x0a, KEY_5},
23         { 0x09, KEY_6},
24         { 0x0f, KEY_7},
25         { 0x0e, KEY_8},
26         { 0x0d, KEY_9},
27         { 0x12, KEY_0},
28         { 0x16, KEY_CHANNELUP}, /*ch+*/
29         { 0x11, KEY_CHANNELDOWN},/*ch-*/
30         { 0x13, KEY_VOLUMEUP},  /*vol+*/
31         { 0x0c, KEY_VOLUMEDOWN},/*vol-*/
32         { 0x03, KEY_RECORD},    /*rec*/
33         { 0x18, KEY_PAUSE},     /*pause*/
34         { 0x19, KEY_OK},        /*ok*/
35         { 0x1a, KEY_CAMERA},    /* snapshot */
36         { 0x01, KEY_UP},
37         { 0x10, KEY_LEFT},
38         { 0x02, KEY_RIGHT},
39         { 0x08, KEY_DOWN},
40         { 0x15, KEY_FAVORITES},
41         { 0x17, KEY_SUBTITLE},
42         { 0x1d, KEY_ZOOM},
43         { 0x1f, KEY_EXIT},
44         { 0x1e, KEY_MENU},
45         { 0x1c, KEY_EPG},
46         { 0x00, KEY_PREVIOUS},
47         { 0x1b, KEY_MODE},
48 };
49
50 static struct rc_keymap tbs_nec_map = {
51         .map = {
52                 .scan    = tbs_nec,
53                 .size    = ARRAY_SIZE(tbs_nec),
54                 .ir_type = IR_TYPE_UNKNOWN,     /* Legacy IR type */
55                 .name    = RC_MAP_TBS_NEC,
56         }
57 };
58
59 static int __init init_rc_map_tbs_nec(void)
60 {
61         return ir_register_map(&tbs_nec_map);
62 }
63
64 static void __exit exit_rc_map_tbs_nec(void)
65 {
66         ir_unregister_map(&tbs_nec_map);
67 }
68
69 module_init(init_rc_map_tbs_nec)
70 module_exit(exit_rc_map_tbs_nec)
71
72 MODULE_LICENSE("GPL");
73 MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");