xref: /linux/drivers/media/rc/keymaps/rc-behold-columbus.c (revision 0526b56cbc3c489642bd6a5fe4b718dea7ef0ee8)
1 // SPDX-License-Identifier: GPL-2.0+
2 // behold-columbus.h - Keytable for behold_columbus Remote Controller
3 //
4 // keymap imported from ir-keymaps.c
5 //
6 // Copyright (c) 2010 by Mauro Carvalho Chehab
7 
8 #include <media/rc-map.h>
9 #include <linux/module.h>
10 
11 /* Beholder Intl. Ltd. 2008
12  * Dmitry Belimov d.belimov@google.com
13  * Keytable is used by BeholdTV Columbus
14  * The "ascii-art picture" below (in comments, first row
15  * is the keycode in hex, and subsequent row(s) shows
16  * the button labels (several variants when appropriate)
17  * helps to decide which keycodes to assign to the buttons.
18  */
19 
20 static struct rc_map_table behold_columbus[] = {
21 
22 	/*  0x13   0x11   0x1C   0x12  *
23 	 *  Mute  Source  TV/FM  Power *
24 	 *                             */
25 
26 	{ 0x13, KEY_MUTE },
27 	{ 0x11, KEY_VIDEO },
28 	{ 0x1C, KEY_TUNER },	/* KEY_TV/KEY_RADIO	*/
29 	{ 0x12, KEY_POWER },
30 
31 	/*  0x01    0x02    0x03  0x0D    *
32 	 *   1       2       3   Stereo   *
33 	 *				  *
34 	 *  0x04    0x05    0x06  0x19    *
35 	 *   4       5       6   Snapshot *
36 	 *				  *
37 	 *  0x07    0x08    0x09  0x10    *
38 	 *   7       8       9    Zoom	  *
39 	 *                                */
40 	{ 0x01, KEY_NUMERIC_1 },
41 	{ 0x02, KEY_NUMERIC_2 },
42 	{ 0x03, KEY_NUMERIC_3 },
43 	{ 0x0D, KEY_SETUP },	  /* Setup key */
44 	{ 0x04, KEY_NUMERIC_4 },
45 	{ 0x05, KEY_NUMERIC_5 },
46 	{ 0x06, KEY_NUMERIC_6 },
47 	{ 0x19, KEY_CAMERA },	/* Snapshot key */
48 	{ 0x07, KEY_NUMERIC_7 },
49 	{ 0x08, KEY_NUMERIC_8 },
50 	{ 0x09, KEY_NUMERIC_9 },
51 	{ 0x10, KEY_ZOOM },
52 
53 	/*  0x0A    0x00    0x0B       0x0C   *
54 	 * RECALL    0    ChannelUp  VolumeUp *
55 	 *                                    */
56 	{ 0x0A, KEY_AGAIN },
57 	{ 0x00, KEY_NUMERIC_0 },
58 	{ 0x0B, KEY_CHANNELUP },
59 	{ 0x0C, KEY_VOLUMEUP },
60 
61 	/*   0x1B      0x1D      0x15        0x18     *
62 	 * Timeshift  Record  ChannelDown  VolumeDown *
63 	 *                                            */
64 
65 	{ 0x1B, KEY_TIME },
66 	{ 0x1D, KEY_RECORD },
67 	{ 0x15, KEY_CHANNELDOWN },
68 	{ 0x18, KEY_VOLUMEDOWN },
69 
70 	/*   0x0E   0x1E     0x0F     0x1A  *
71 	 *   Stop   Pause  Previous   Next  *
72 	 *                                  */
73 
74 	{ 0x0E, KEY_STOP },
75 	{ 0x1E, KEY_PAUSE },
76 	{ 0x0F, KEY_PREVIOUS },
77 	{ 0x1A, KEY_NEXT },
78 
79 };
80 
81 static struct rc_map_list behold_columbus_map = {
82 	.map = {
83 		.scan     = behold_columbus,
84 		.size     = ARRAY_SIZE(behold_columbus),
85 		.rc_proto = RC_PROTO_UNKNOWN,	/* Legacy IR type */
86 		.name     = RC_MAP_BEHOLD_COLUMBUS,
87 	}
88 };
89 
90 static int __init init_rc_map_behold_columbus(void)
91 {
92 	return rc_map_register(&behold_columbus_map);
93 }
94 
95 static void __exit exit_rc_map_behold_columbus(void)
96 {
97 	rc_map_unregister(&behold_columbus_map);
98 }
99 
100 module_init(init_rc_map_behold_columbus)
101 module_exit(exit_rc_map_behold_columbus)
102 
103 MODULE_LICENSE("GPL");
104 MODULE_AUTHOR("Mauro Carvalho Chehab");
105