diff options
author | Christian Hewitt <christianshewitt@gmail.com> | 2019-08-15 10:59:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-21 17:39:54 -0400 |
commit | 7bb53f361c59b68e521a05fce579ccfa8021c3a0 (patch) | |
tree | e3e0afe659829dd6c3340c029e0f76d3719a5932 | |
parent | e30399e1bd6e215ec20981612646ec73a4385c33 (diff) |
media: rc: add keymap for Tanix TX5 max remote
The Tanix TX5 max Android STB ships with a simple NEC remote.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/rc/keymaps/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/rc/keymaps/rc-tanix-tx5max.c | 68 | ||||
-rw-r--r-- | include/media/rc-map.h | 1 |
3 files changed, 70 insertions, 0 deletions
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 31720d842f88..85423cc84149 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile | |||
@@ -96,6 +96,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ | |||
96 | rc-streamzap.o \ | 96 | rc-streamzap.o \ |
97 | rc-tango.o \ | 97 | rc-tango.o \ |
98 | rc-tanix-tx3mini.o \ | 98 | rc-tanix-tx3mini.o \ |
99 | rc-tanix-tx5max.o \ | ||
99 | rc-tbs-nec.o \ | 100 | rc-tbs-nec.o \ |
100 | rc-technisat-ts35.o \ | 101 | rc-technisat-ts35.o \ |
101 | rc-technisat-usb2.o \ | 102 | rc-technisat-usb2.o \ |
diff --git a/drivers/media/rc/keymaps/rc-tanix-tx5max.c b/drivers/media/rc/keymaps/rc-tanix-tx5max.c new file mode 100644 index 000000000000..59aaabed80dd --- /dev/null +++ b/drivers/media/rc/keymaps/rc-tanix-tx5max.c | |||
@@ -0,0 +1,68 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0+ | ||
2 | // Copyright (c) 2018 Christian Hewitt | ||
3 | |||
4 | #include <media/rc-map.h> | ||
5 | #include <linux/module.h> | ||
6 | |||
7 | /* | ||
8 | * Keymap for the Tanix TX5 max STB remote control | ||
9 | */ | ||
10 | |||
11 | static struct rc_map_table tanix_tx5max[] = { | ||
12 | { 0x40404d, KEY_POWER }, | ||
13 | { 0x404043, KEY_MUTE }, | ||
14 | |||
15 | { 0x404017, KEY_VOLUMEDOWN }, | ||
16 | { 0x404018, KEY_VOLUMEUP }, | ||
17 | |||
18 | { 0x40400b, KEY_UP }, | ||
19 | { 0x404010, KEY_LEFT }, | ||
20 | { 0x404011, KEY_RIGHT }, | ||
21 | { 0x40400e, KEY_DOWN }, | ||
22 | { 0x40400d, KEY_OK }, | ||
23 | |||
24 | { 0x40401a, KEY_HOME }, | ||
25 | { 0x404045, KEY_MENU }, | ||
26 | { 0x404042, KEY_BACK }, | ||
27 | |||
28 | { 0x404001, KEY_1 }, | ||
29 | { 0x404002, KEY_2 }, | ||
30 | { 0x404003, KEY_3 }, | ||
31 | |||
32 | { 0x404004, KEY_4 }, | ||
33 | { 0x404005, KEY_5 }, | ||
34 | { 0x404006, KEY_6 }, | ||
35 | |||
36 | { 0x404007, KEY_7 }, | ||
37 | { 0x404008, KEY_8 }, | ||
38 | { 0x404009, KEY_9 }, | ||
39 | |||
40 | { 0x404047, KEY_SUBTITLE }, // mouse | ||
41 | { 0x404000, KEY_0 }, | ||
42 | { 0x40400c, KEY_DELETE }, | ||
43 | }; | ||
44 | |||
45 | static struct rc_map_list tanix_tx5max_map = { | ||
46 | .map = { | ||
47 | .scan = tanix_tx5max, | ||
48 | .size = ARRAY_SIZE(tanix_tx5max), | ||
49 | .rc_proto = RC_PROTO_NECX, | ||
50 | .name = RC_MAP_TANIX_TX5MAX, | ||
51 | } | ||
52 | }; | ||
53 | |||
54 | static int __init init_rc_map_tanix_tx5max(void) | ||
55 | { | ||
56 | return rc_map_register(&tanix_tx5max_map); | ||
57 | } | ||
58 | |||
59 | static void __exit exit_rc_map_tanix_tx5max(void) | ||
60 | { | ||
61 | rc_map_unregister(&tanix_tx5max_map); | ||
62 | } | ||
63 | |||
64 | module_init(init_rc_map_tanix_tx5max) | ||
65 | module_exit(exit_rc_map_tanix_tx5max) | ||
66 | |||
67 | MODULE_LICENSE("GPL"); | ||
68 | MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>"); | ||
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index b8929d0c5d6b..a2ebe4868567 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -250,6 +250,7 @@ struct rc_map *rc_map_get(const char *name); | |||
250 | #define RC_MAP_STREAMZAP "rc-streamzap" | 250 | #define RC_MAP_STREAMZAP "rc-streamzap" |
251 | #define RC_MAP_TANGO "rc-tango" | 251 | #define RC_MAP_TANGO "rc-tango" |
252 | #define RC_MAP_TANIX_TX3MINI "rc-tanix-tx3mini" | 252 | #define RC_MAP_TANIX_TX3MINI "rc-tanix-tx3mini" |
253 | #define RC_MAP_TANIX_TX5MAX "rc-tanix-tx5max" | ||
253 | #define RC_MAP_TBS_NEC "rc-tbs-nec" | 254 | #define RC_MAP_TBS_NEC "rc-tbs-nec" |
254 | #define RC_MAP_TECHNISAT_TS35 "rc-technisat-ts35" | 255 | #define RC_MAP_TECHNISAT_TS35 "rc-technisat-ts35" |
255 | #define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2" | 256 | #define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2" |