Skip to content

Commit 67cbf63

Browse files
nibble.maxmchehab
authored andcommitted
[media] rc: add a map for DVBSky devices.
This is a RC5 remote controller map for DVBSky S860/960 devices. Signed-off-by: Nibble Max <nibble.max@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
1 parent af64fb3 commit 67cbf63

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

‎drivers/media/rc/keymaps/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
2828
rc-dm1105-nec.o \
2929
rc-dntv-live-dvb-t.o \
3030
rc-dntv-live-dvbt-pro.o \
31+
rc-dvbsky.o \
3132
rc-em-terratec.o \
3233
rc-encore-enltv2.o \
3334
rc-encore-enltv.o \
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/* rc-dvbsky.c - Keytable for DVBSky Remote Controllers
2+
*
3+
* keymap imported from ir-keymaps.c
4+
*
5+
*
6+
* Copyright (c) 2010-2012 by Nibble Max <nibble.max@gmail.com>
7+
*
8+
* This program is free software; you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation; either version 2 of the License, or
11+
* (at your option) any later version.
12+
*/
13+
14+
#include <media/rc-map.h>
15+
#include <linux/module.h>
16+
/*
17+
* This table contains the complete RC5 code, instead of just the data part
18+
*/
19+
20+
static struct rc_map_table rc5_dvbsky[] = {
21+
{ 0x0000, KEY_0 },
22+
{ 0x0001, KEY_1 },
23+
{ 0x0002, KEY_2 },
24+
{ 0x0003, KEY_3 },
25+
{ 0x0004, KEY_4 },
26+
{ 0x0005, KEY_5 },
27+
{ 0x0006, KEY_6 },
28+
{ 0x0007, KEY_7 },
29+
{ 0x0008, KEY_8 },
30+
{ 0x0009, KEY_9 },
31+
{ 0x000a, KEY_MUTE },
32+
{ 0x000d, KEY_OK },
33+
{ 0x000b, KEY_STOP },
34+
{ 0x000c, KEY_EXIT },
35+
{ 0x000e, KEY_CAMERA }, /*Snap shot*/
36+
{ 0x000f, KEY_SUBTITLE }, /*PIP*/
37+
{ 0x0010, KEY_VOLUMEUP },
38+
{ 0x0011, KEY_VOLUMEDOWN },
39+
{ 0x0012, KEY_FAVORITES },
40+
{ 0x0013, KEY_LIST }, /*Info*/
41+
{ 0x0016, KEY_PAUSE },
42+
{ 0x0017, KEY_PLAY },
43+
{ 0x001f, KEY_RECORD },
44+
{ 0x0020, KEY_CHANNELDOWN },
45+
{ 0x0021, KEY_CHANNELUP },
46+
{ 0x0025, KEY_POWER2 },
47+
{ 0x0026, KEY_REWIND },
48+
{ 0x0027, KEY_FASTFORWARD },
49+
{ 0x0029, KEY_LAST },
50+
{ 0x002b, KEY_MENU },
51+
{ 0x002c, KEY_EPG },
52+
{ 0x002d, KEY_ZOOM },
53+
};
54+
55+
static struct rc_map_list rc5_dvbsky_map = {
56+
.map = {
57+
.scan = rc5_dvbsky,
58+
.size = ARRAY_SIZE(rc5_dvbsky),
59+
.rc_type = RC_TYPE_RC5,
60+
.name = RC_MAP_DVBSKY,
61+
}
62+
};
63+
64+
static int __init init_rc_map_rc5_dvbsky(void)
65+
{
66+
return rc_map_register(&rc5_dvbsky_map);
67+
}
68+
69+
static void __exit exit_rc_map_rc5_dvbsky(void)
70+
{
71+
rc_map_unregister(&rc5_dvbsky_map);
72+
}
73+
74+
module_init(init_rc_map_rc5_dvbsky)
75+
module_exit(exit_rc_map_rc5_dvbsky)
76+
77+
MODULE_LICENSE("GPL");
78+
MODULE_AUTHOR("Nibble Max <nibble.max@gmail.com>");

0 commit comments

Comments
 (0)