summaryrefslogtreecommitdiff
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorChristian Hewitt <christianshewitt@gmail.com>2021-02-01 21:59:51 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-11 11:59:41 +0100
commit3f9fcc4c84c6493988ab7dc4e82bf836be56714e (patch)
treee9efe0e556140e898f869f29509a61c567ecefd7 /drivers/media/rc
parent0ec694d6718a9fab0f49a280557feb257c9d7843 (diff)
media: rc: add keymap for minix-neo remote
Add a keymap and bindings for the simple IR (NEC) remote used with Minix 'NEO' branded Android STB devices. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/keymaps/Makefile1
-rw-r--r--drivers/media/rc/keymaps/rc-minix-neo.c55
2 files changed, 56 insertions, 0 deletions
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index b252a1d2ebd6..b7f53f44c5c8 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -70,6 +70,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-medion-x10.o \
rc-medion-x10-digitainer.o \
rc-medion-x10-or2x.o \
+ rc-minix-neo.o \
rc-msi-digivox-ii.o \
rc-msi-digivox-iii.o \
rc-msi-tvanywhere.o \
diff --git a/drivers/media/rc/keymaps/rc-minix-neo.c b/drivers/media/rc/keymaps/rc-minix-neo.c
new file mode 100644
index 000000000000..9165af548ff1
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-minix-neo.c
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright (C) 2021 Christian Hewitt <christianshewitt@gmail.com>
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+//
+// Keytable for the Minix NEO remote control
+//
+
+static struct rc_map_table minix_neo[] = {
+
+ { 0x118, KEY_POWER },
+
+ { 0x146, KEY_UP },
+ { 0x116, KEY_DOWN },
+ { 0x147, KEY_LEFT },
+ { 0x115, KEY_RIGHT },
+ { 0x155, KEY_ENTER },
+
+ { 0x110, KEY_VOLUMEDOWN },
+ { 0x140, KEY_BACK },
+ { 0x114, KEY_VOLUMEUP },
+
+ { 0x10d, KEY_HOME },
+ { 0x104, KEY_MENU },
+ { 0x112, KEY_CONFIG },
+
+};
+
+static struct rc_map_list minix_neo_map = {
+ .map = {
+ .scan = minix_neo,
+ .size = ARRAY_SIZE(minix_neo),
+ .rc_proto = RC_PROTO_NEC,
+ .name = RC_MAP_MINIX_NEO,
+ }
+};
+
+static int __init init_rc_map_minix_neo(void)
+{
+ return rc_map_register(&minix_neo_map);
+}
+
+static void __exit exit_rc_map_minix_neo(void)
+{
+ rc_map_unregister(&minix_neo_map);
+}
+
+module_init(init_rc_map_minix_neo)
+module_exit(exit_rc_map_minix_neo)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");