linux/drivers/media/IR/keymaps/rc-norwood.c
Mauro Carvalho Chehab 6686fa6917 V4L/DVB: Break Remote Controller keymaps into modules
The original Remote Controller approach were very messy: a big file,
that were part of ir-common kernel module, containing 64 different
RC keymap tables, used by the V4L/DVB drivers.

Better to break each RC keymap table into a separate module,
registering them into rc core on a process similar to the fs/nls tables.

As an userspace program is now in charge of loading those tables,
adds an option to allow the complete removal of those tables from
kernelspace.

Yet, on embedded devices like Set Top Boxes and TV sets, maybe the
only available input device is the IR. So, we should keep allowing
the usage of in-kernel tables, but a latter patch should change
the default to 'n', after giving some time for distros to add
the v4l-utils with the ir-keytable program, to allow the table
load via userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:49 -03:00

86 lines
2.5 KiB
C

/* norwood.h - Keytable for norwood Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Norwood Micro (non-Pro) TV Tuner
By Peter Naulls <peter@chocky.org>
Key comments are the functions given in the manual */
static struct ir_scancode norwood[] = {
/* Keys 0 to 9 */
{ 0x20, KEY_0 },
{ 0x21, KEY_1 },
{ 0x22, KEY_2 },
{ 0x23, KEY_3 },
{ 0x24, KEY_4 },
{ 0x25, KEY_5 },
{ 0x26, KEY_6 },
{ 0x27, KEY_7 },
{ 0x28, KEY_8 },
{ 0x29, KEY_9 },
{ 0x78, KEY_TUNER }, /* Video Source */
{ 0x2c, KEY_EXIT }, /* Open/Close software */
{ 0x2a, KEY_SELECT }, /* 2 Digit Select */
{ 0x69, KEY_AGAIN }, /* Recall */
{ 0x32, KEY_BRIGHTNESSUP }, /* Brightness increase */
{ 0x33, KEY_BRIGHTNESSDOWN }, /* Brightness decrease */
{ 0x6b, KEY_KPPLUS }, /* (not named >>>>>) */
{ 0x6c, KEY_KPMINUS }, /* (not named <<<<<) */
{ 0x2d, KEY_MUTE }, /* Mute */
{ 0x30, KEY_VOLUMEUP }, /* Volume up */
{ 0x31, KEY_VOLUMEDOWN }, /* Volume down */
{ 0x60, KEY_CHANNELUP }, /* Channel up */
{ 0x61, KEY_CHANNELDOWN }, /* Channel down */
{ 0x3f, KEY_RECORD }, /* Record */
{ 0x37, KEY_PLAY }, /* Play */
{ 0x36, KEY_PAUSE }, /* Pause */
{ 0x2b, KEY_STOP }, /* Stop */
{ 0x67, KEY_FASTFORWARD }, /* Foward */
{ 0x66, KEY_REWIND }, /* Rewind */
{ 0x3e, KEY_SEARCH }, /* Auto Scan */
{ 0x2e, KEY_CAMERA }, /* Capture Video */
{ 0x6d, KEY_MENU }, /* Show/Hide Control */
{ 0x2f, KEY_ZOOM }, /* Full Screen */
{ 0x34, KEY_RADIO }, /* FM */
{ 0x65, KEY_POWER }, /* Computer power */
};
static struct rc_keymap norwood_map = {
.map = {
.scan = norwood,
.size = ARRAY_SIZE(norwood),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_NORWOOD,
}
};
static int __init init_rc_map_norwood(void)
{
return ir_register_map(&norwood_map);
}
static void __exit exit_rc_map_norwood(void)
{
ir_unregister_map(&norwood_map);
}
module_init(init_rc_map_norwood)
module_exit(exit_rc_map_norwood)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");