154 lines
4.8 KiB
Diff
154 lines
4.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
Date: Mon, 13 Feb 2023 11:38:16 +0000
|
|
Subject: add rc keymaps for Sunvell T95Z Plus
|
|
|
|
WIP: media: rc: add keymap for Sunvell T95Z Plus
|
|
WIP: dt-bindings: media: rc: add rc-sunvell-t95z-plus
|
|
Add a binding for the rc-sunvell-t95z-plus remote keymap
|
|
WIP: dt-bindings: add sunvell vendor prefix
|
|
Add vendor prefix for Shenzhen Sunvell Electronics Co., Ltd
|
|
|
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
---
|
|
Documentation/devicetree/bindings/media/rc.yaml | 1 +
|
|
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 +
|
|
drivers/media/rc/keymaps/Makefile | 1 +
|
|
drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c | 75 ++++++++++
|
|
include/media/rc-map.h | 1 +
|
|
5 files changed, 80 insertions(+)
|
|
|
|
diff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml
|
|
index 7bbe580c80f7..dc53a1cbf6fd 100644
|
|
--- a/Documentation/devicetree/bindings/media/rc.yaml
|
|
+++ b/Documentation/devicetree/bindings/media/rc.yaml
|
|
@@ -127,6 +127,7 @@ properties:
|
|
- rc-reddo
|
|
- rc-snapstream-firefly
|
|
- rc-streamzap
|
|
+ - rc-sunvell-t95z-plus
|
|
- rc-su3000
|
|
- rc-tanix-tx3mini
|
|
- rc-tanix-tx5max
|
|
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
|
index 82d39ab0231b..83c94c67861d 100644
|
|
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
|
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
|
@@ -1306,6 +1306,8 @@ patternProperties:
|
|
description: Sundance DSP Inc.
|
|
"^sunplus,.*":
|
|
description: Sunplus Technology Co., Ltd.
|
|
+ "^sunvell,.*":
|
|
+ description: Shenzhen Sunvell Electronics Co., Ltd
|
|
"^SUNW,.*":
|
|
description: Sun Microsystems, Inc
|
|
"^supermicro,.*":
|
|
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
|
|
index f19558fdab0c..8f8466ea9dad 100644
|
|
--- a/drivers/media/rc/keymaps/Makefile
|
|
+++ b/drivers/media/rc/keymaps/Makefile
|
|
@@ -107,6 +107,7 @@ obj-$(CONFIG_RC_MAP) += \
|
|
rc-reddo.o \
|
|
rc-snapstream-firefly.o \
|
|
rc-streamzap.o \
|
|
+ rc-sunvell-t95z-plus.o \
|
|
rc-su3000.o \
|
|
rc-tanix-tx3mini.o \
|
|
rc-tanix-tx5max.o \
|
|
diff --git a/drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c b/drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c
|
|
new file mode 100644
|
|
index 000000000000..aaaf6b1c0045
|
|
--- /dev/null
|
|
+++ b/drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c
|
|
@@ -0,0 +1,75 @@
|
|
+// SPDX-License-Identifier: GPL-2.0+
|
|
+/*
|
|
+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com
|
|
+ */
|
|
+
|
|
+#include <media/rc-map.h>
|
|
+#include <linux/module.h>
|
|
+
|
|
+/*
|
|
+ * Keytable for Sunvell T95Z Plus remote control
|
|
+ *
|
|
+ */
|
|
+
|
|
+static struct rc_map_table sunvell_t95z_plus[] = {
|
|
+ { 0xdf1c, KEY_POWER },
|
|
+ // TV CONTROLS
|
|
+
|
|
+ { 0xdf4b, KEY_PREVIOUS },
|
|
+ { 0xdf01, KEY_SCREEN }, // TV
|
|
+ { 0xdf5d, KEY_VOLUMEUP },
|
|
+
|
|
+ { 0xdf4f, KEY_NEXT },
|
|
+ { 0xdf5f, KEY_FAVORITES }, // KODI
|
|
+ { 0xdf5c, KEY_VOLUMEDOWN },
|
|
+
|
|
+ { 0xdf42, KEY_HOME },
|
|
+ { 0xdf0a, KEY_BACK },
|
|
+
|
|
+ { 0xdf1a, KEY_UP },
|
|
+ { 0xdf47, KEY_LEFT },
|
|
+ { 0xdf06, KEY_ENTER },
|
|
+ { 0xdf07, KEY_RIGHT },
|
|
+ { 0xdf48, KEY_DOWN },
|
|
+
|
|
+ { 0xdf03, KEY_INFO }, // MOUSE
|
|
+ { 0xdf18, KEY_MENU },
|
|
+
|
|
+ { 0xdf54, KEY_1 },
|
|
+ { 0xdf16, KEY_2 },
|
|
+ { 0xdf15, KEY_3 },
|
|
+ { 0xdf50, KEY_4 },
|
|
+ { 0xdf12, KEY_5 },
|
|
+ { 0xdf11, KEY_6 },
|
|
+ { 0xdf4c, KEY_7 },
|
|
+ { 0xdf0e, KEY_8 },
|
|
+ { 0xdf0d, KEY_9 },
|
|
+ { 0xdf41, KEY_WWW }, // WORLD
|
|
+ { 0xdf0c, KEY_0 },
|
|
+ { 0xdf10, KEY_DELETE },
|
|
+};
|
|
+
|
|
+static struct rc_map_list sunvell_t95z_plus_map = {
|
|
+ .map = {
|
|
+ .scan = sunvell_t95z_plus,
|
|
+ .size = ARRAY_SIZE(sunvell_t95z_plus),
|
|
+ .rc_proto = RC_PROTO_NEC,
|
|
+ .name = RC_MAP_SUNVELL_T95Z_PLUS,
|
|
+ }
|
|
+};
|
|
+
|
|
+static int __init init_rc_map_sunvell_t95z_plus(void)
|
|
+{
|
|
+ return rc_map_register(&sunvell_t95z_plus_map);
|
|
+}
|
|
+
|
|
+static void __exit exit_rc_map_sunvell_t95z_plus(void)
|
|
+{
|
|
+ rc_map_unregister(&sunvell_t95z_plus_map);
|
|
+}
|
|
+
|
|
+module_init(init_rc_map_sunvell_t95z_plus)
|
|
+module_exit(exit_rc_map_sunvell_t95z_plus)
|
|
+
|
|
+MODULE_LICENSE("GPL");
|
|
+MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");
|
|
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
|
|
index 4676545ffd8f..770527edee1d 100644
|
|
--- a/include/media/rc-map.h
|
|
+++ b/include/media/rc-map.h
|
|
@@ -314,6 +314,7 @@ struct rc_map *rc_map_get(const char *name);
|
|
#define RC_MAP_REDDO "rc-reddo"
|
|
#define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly"
|
|
#define RC_MAP_STREAMZAP "rc-streamzap"
|
|
+#define RC_MAP_SUNVELL_T95Z_PLUS "rc-sunvell-t95z-plus"
|
|
#define RC_MAP_SU3000 "rc-su3000"
|
|
#define RC_MAP_TANIX_TX3MINI "rc-tanix-tx3mini"
|
|
#define RC_MAP_TANIX_TX5MAX "rc-tanix-tx5max"
|
|
--
|
|
Armbian
|
|
|