PageRenderTime 36ms CodeModel.GetById 21ms app.highlight 12ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/media/rc/keymaps/rc-behold-columbus.c

https://bitbucket.org/wisechild/galaxy-nexus
C | 108 lines | 51 code | 17 blank | 40 comment | 0 complexity | 7ef1cf45ffefde4fd08ed32a45fcb9ea MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
  1/* behold-columbus.h - Keytable for behold_columbus 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/* Beholder Intl. Ltd. 2008
 16 * Dmitry Belimov d.belimov@google.com
 17 * Keytable is used by BeholdTV Columbus
 18 * The "ascii-art picture" below (in comments, first row
 19 * is the keycode in hex, and subsequent row(s) shows
 20 * the button labels (several variants when appropriate)
 21 * helps to descide which keycodes to assign to the buttons.
 22 */
 23
 24static struct rc_map_table behold_columbus[] = {
 25
 26	/*  0x13   0x11   0x1C   0x12  *
 27	 *  Mute  Source  TV/FM  Power *
 28	 *                             */
 29
 30	{ 0x13, KEY_MUTE },
 31	{ 0x11, KEY_VIDEO },
 32	{ 0x1C, KEY_TUNER },	/* KEY_TV/KEY_RADIO	*/
 33	{ 0x12, KEY_POWER },
 34
 35	/*  0x01    0x02    0x03  0x0D    *
 36	 *   1       2       3   Stereo   *
 37	 *                        	  *
 38	 *  0x04    0x05    0x06  0x19    *
 39	 *   4       5       6   Snapshot *
 40	 *                        	  *
 41	 *  0x07    0x08    0x09  0x10    *
 42	 *   7       8       9    Zoom 	  *
 43	 *                                */
 44	{ 0x01, KEY_1 },
 45	{ 0x02, KEY_2 },
 46	{ 0x03, KEY_3 },
 47	{ 0x0D, KEY_SETUP },	  /* Setup key */
 48	{ 0x04, KEY_4 },
 49	{ 0x05, KEY_5 },
 50	{ 0x06, KEY_6 },
 51	{ 0x19, KEY_CAMERA },	/* Snapshot key */
 52	{ 0x07, KEY_7 },
 53	{ 0x08, KEY_8 },
 54	{ 0x09, KEY_9 },
 55	{ 0x10, KEY_ZOOM },
 56
 57	/*  0x0A    0x00    0x0B       0x0C   *
 58	 * RECALL    0    ChannelUp  VolumeUp *
 59	 *                                    */
 60	{ 0x0A, KEY_AGAIN },
 61	{ 0x00, KEY_0 },
 62	{ 0x0B, KEY_CHANNELUP },
 63	{ 0x0C, KEY_VOLUMEUP },
 64
 65	/*   0x1B      0x1D      0x15        0x18     *
 66	 * Timeshift  Record  ChannelDown  VolumeDown *
 67	 *                                            */
 68
 69	{ 0x1B, KEY_TIME },
 70	{ 0x1D, KEY_RECORD },
 71	{ 0x15, KEY_CHANNELDOWN },
 72	{ 0x18, KEY_VOLUMEDOWN },
 73
 74	/*   0x0E   0x1E     0x0F     0x1A  *
 75	 *   Stop   Pause  Previouse  Next  *
 76	 *                                  */
 77
 78	{ 0x0E, KEY_STOP },
 79	{ 0x1E, KEY_PAUSE },
 80	{ 0x0F, KEY_PREVIOUS },
 81	{ 0x1A, KEY_NEXT },
 82
 83};
 84
 85static struct rc_map_list behold_columbus_map = {
 86	.map = {
 87		.scan    = behold_columbus,
 88		.size    = ARRAY_SIZE(behold_columbus),
 89		.rc_type = RC_TYPE_UNKNOWN,	/* Legacy IR type */
 90		.name    = RC_MAP_BEHOLD_COLUMBUS,
 91	}
 92};
 93
 94static int __init init_rc_map_behold_columbus(void)
 95{
 96	return rc_map_register(&behold_columbus_map);
 97}
 98
 99static void __exit exit_rc_map_behold_columbus(void)
100{
101	rc_map_unregister(&behold_columbus_map);
102}
103
104module_init(init_rc_map_behold_columbus)
105module_exit(exit_rc_map_behold_columbus)
106
107MODULE_LICENSE("GPL");
108MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");