Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * TerraTec remote controller keytable
0004  *
0005  * Copyright (C) 2011 Martin Groszhauser <mgroszhauser@gmail.com>
0006  * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
0007  */
0008 
0009 #include <media/rc-map.h>
0010 #include <linux/module.h>
0011 
0012 /*
0013  * TerraTec slim remote, 6 rows, 3 columns.
0014  * Keytable from Martin Groszhauser <mgroszhauser@gmail.com>
0015  */
0016 static struct rc_map_table terratec_slim_2[] = {
0017     { 0x8001, KEY_MUTE },            /* MUTE */
0018     { 0x8002, KEY_VOLUMEDOWN },
0019     { 0x8003, KEY_CHANNELDOWN },
0020     { 0x8004, KEY_NUMERIC_1 },
0021     { 0x8005, KEY_NUMERIC_2 },
0022     { 0x8006, KEY_NUMERIC_3 },
0023     { 0x8007, KEY_NUMERIC_4 },
0024     { 0x8008, KEY_NUMERIC_5 },
0025     { 0x8009, KEY_NUMERIC_6 },
0026     { 0x800a, KEY_NUMERIC_7 },
0027     { 0x800c, KEY_ZOOM },            /* [fullscreen] */
0028     { 0x800d, KEY_NUMERIC_0 },
0029     { 0x800e, KEY_AGAIN },           /* [two arrows forming a circle] */
0030     { 0x8012, KEY_POWER2 },          /* [red power button] */
0031     { 0x801a, KEY_VOLUMEUP },
0032     { 0x801b, KEY_NUMERIC_8 },
0033     { 0x801e, KEY_CHANNELUP },
0034     { 0x801f, KEY_NUMERIC_9 },
0035 };
0036 
0037 static struct rc_map_list terratec_slim_2_map = {
0038     .map = {
0039         .scan     = terratec_slim_2,
0040         .size     = ARRAY_SIZE(terratec_slim_2),
0041         .rc_proto = RC_PROTO_NEC,
0042         .name     = RC_MAP_TERRATEC_SLIM_2,
0043     }
0044 };
0045 
0046 static int __init init_rc_map_terratec_slim_2(void)
0047 {
0048     return rc_map_register(&terratec_slim_2_map);
0049 }
0050 
0051 static void __exit exit_rc_map_terratec_slim_2(void)
0052 {
0053     rc_map_unregister(&terratec_slim_2_map);
0054 }
0055 
0056 module_init(init_rc_map_terratec_slim_2)
0057 module_exit(exit_rc_map_terratec_slim_2)
0058 
0059 MODULE_LICENSE("GPL");
0060 MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");