aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorremi schwartz <remi.schwartz@gmail.com>2012-05-19 05:11:47 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-20 15:05:02 -0400
commit75c7dbcab43865ea247747ffbf5ab48da75ba5ce (patch)
tree56e56a7f284dfe2821a4a71f273f772dc7992c45 /drivers/media/rc
parent711e1bfb5b7e77e5317b25fc5a2faf3d47cf5d7b (diff)
[media] patch for Asus My Cinema PS3-100 (1043:48cd)
Signed-off-by: Remi Schwartz <remi.schwartz@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/keymaps/Makefile1
-rw-r--r--drivers/media/rc/keymaps/rc-asus-ps3-100.c91
2 files changed, 92 insertions, 0 deletions
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index 6d41a29861ac..ab84d66c67c1 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -3,6 +3,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
3 rc-anysee.o \ 3 rc-anysee.o \
4 rc-apac-viewcomp.o \ 4 rc-apac-viewcomp.o \
5 rc-asus-pc39.o \ 5 rc-asus-pc39.o \
6 rc-asus-ps3-100.o \
6 rc-ati-tv-wonder-hd-600.o \ 7 rc-ati-tv-wonder-hd-600.o \
7 rc-ati-x10.o \ 8 rc-ati-x10.o \
8 rc-avermedia-a16d.o \ 9 rc-avermedia-a16d.o \
diff --git a/drivers/media/rc/keymaps/rc-asus-ps3-100.c b/drivers/media/rc/keymaps/rc-asus-ps3-100.c
new file mode 100644
index 000000000000..ba76609c5936
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-asus-ps3-100.c
@@ -0,0 +1,91 @@
1/* asus-ps3-100.h - Keytable for asus_ps3_100 Remote Controller
2 *
3 * Copyright (c) 2012 by Mauro Carvalho Chehab <mchehab@redhat.com>
4 *
5 * Based on a previous patch from Remi Schwartz <remi.schwartz@gmail.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#include <linux/module.h>
15
16static struct rc_map_table asus_ps3_100[] = {
17 { 0x081c, KEY_HOME }, /* home */
18 { 0x081e, KEY_TV }, /* tv */
19 { 0x0803, KEY_TEXT }, /* teletext */
20 { 0x0829, KEY_POWER }, /* close */
21
22 { 0x080b, KEY_RED }, /* red */
23 { 0x080d, KEY_YELLOW }, /* yellow */
24 { 0x0806, KEY_BLUE }, /* blue */
25 { 0x0807, KEY_GREEN }, /* green */
26
27 /* Keys 0 to 9 */
28 { 0x082a, KEY_0 },
29 { 0x0816, KEY_1 },
30 { 0x0812, KEY_2 },
31 { 0x0814, KEY_3 },
32 { 0x0836, KEY_4 },
33 { 0x0832, KEY_5 },
34 { 0x0834, KEY_6 },
35 { 0x080e, KEY_7 },
36 { 0x080a, KEY_8 },
37 { 0x080c, KEY_9 },
38
39 { 0x0815, KEY_VOLUMEUP },
40 { 0x0826, KEY_VOLUMEDOWN },
41 { 0x0835, KEY_CHANNELUP }, /* channel / program + */
42 { 0x0824, KEY_CHANNELDOWN }, /* channel / program - */
43
44 { 0x0808, KEY_UP },
45 { 0x0804, KEY_DOWN },
46 { 0x0818, KEY_LEFT },
47 { 0x0810, KEY_RIGHT },
48 { 0x0825, KEY_ENTER }, /* enter */
49
50 { 0x0822, KEY_EXIT }, /* back */
51 { 0x082c, KEY_AB }, /* recall */
52
53 { 0x0820, KEY_AUDIO }, /* TV audio */
54 { 0x0837, KEY_SCREEN }, /* snapshot */
55 { 0x082e, KEY_ZOOM }, /* full screen */
56 { 0x0802, KEY_MUTE }, /* mute */
57
58 { 0x0831, KEY_REWIND }, /* backward << */
59 { 0x0811, KEY_RECORD }, /* recording */
60 { 0x0809, KEY_STOP },
61 { 0x0805, KEY_FASTFORWARD }, /* forward >> */
62 { 0x0821, KEY_PREVIOUS }, /* rew */
63 { 0x081a, KEY_PAUSE }, /* pause */
64 { 0x0839, KEY_PLAY }, /* play */
65 { 0x0819, KEY_NEXT }, /* forward */
66};
67
68static struct rc_map_list asus_ps3_100_map = {
69.map = {
70 .scan = asus_ps3_100,
71 .size = ARRAY_SIZE(asus_ps3_100),
72 .rc_type = RC_TYPE_RC5,
73 .name = RC_MAP_ASUS_PS3_100,
74}
75};
76
77static int __init init_rc_map_asus_ps3_100(void)
78{
79return rc_map_register(&asus_ps3_100_map);
80}
81
82static void __exit exit_rc_map_asus_ps3_100(void)
83{
84rc_map_unregister(&asus_ps3_100_map);
85}
86
87module_init(init_rc_map_asus_ps3_100)
88module_exit(exit_rc_map_asus_ps3_100)
89
90MODULE_LICENSE("GPL");
91MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");