all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 52182001bca1b2815e372f00b776b420889bcd08 4252 bytes (raw)
name: gnu/packages/patches/amlogic-0055-WIP-media-rc-add-keymap-for-MeCool-M8S-Pro-W-remote.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
 
From e8701365b030f23a1237df631201bd99b16e4230 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Sun, 16 Jan 2022 08:48:02 +0000
Subject: [PATCH 55/73] WIP: media: rc: add keymap for MeCool M8S Pro W remote

Add a keymap and bindings for the simple IR (NEC) remote used with
the MeCool M8S Pro W Android STB device.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
 .../devicetree/bindings/media/rc.yaml         |  1 +
 drivers/media/rc/keymaps/Makefile             |  2 +
 .../media/rc/keymaps/rc-mecool-m8s-pro-w.c    | 75 +++++++++++++++++++
 include/media/rc-map.h                        |  1 +
 4 files changed, 79 insertions(+)
 create mode 100644 drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c

diff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml
index 1121006b9fbe..5e3039e71312 100644
--- a/Documentation/devicetree/bindings/media/rc.yaml
+++ b/Documentation/devicetree/bindings/media/rc.yaml
@@ -94,6 +94,7 @@ properties:
       - rc-manli
       - rc-mecool-kii-pro
       - rc-mecool-kiii-pro
+      - rc-mecool-m8s-pro-w
       - rc-medion-x10
       - rc-medion-x10-digitainer
       - rc-medion-x10-or2x
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index f3bf9878d72c..ef48a6bbeca4 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -75,6 +75,8 @@ obj-$(CONFIG_RC_MAP) += \
 			rc-manli.o \
 			rc-mecool-kiii-pro.o \
 			rc-mecool-kii-pro.o \
+			rc-mecool-m8s-pro-w.o \
+			rc-medion-x10.o \
 			rc-medion-x10-digitainer.o \
 			rc-medion-x10.o \
 			rc-medion-x10-or2x.o \
diff --git a/drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c b/drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c
new file mode 100644
index 000000000000..9024b999d5a9
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright (C) 2022 Christian Hewitt <christianshewitt@gmail.com>
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+//
+// Keytable for the MeCool M8S Pro W remote control
+//
+
+static struct rc_map_table mecool_m8s_pro_w[] = {
+
+	{ 0x59, KEY_POWER },
+
+	// TV CONTROLS
+
+	{ 0x08, KEY_PREVIOUS },
+	{ 0x0b, KEY_NEXT },
+	{ 0x18, KEY_TEXT }, // INTERNET
+	{ 0x19, KEY_MUTE },
+	{ 0x13, KEY_VOLUMEUP },
+	{ 0x17, KEY_VOLUMEDOWN },
+
+	{ 0x0d, KEY_HOME },
+	{ 0x05, KEY_BACK },
+
+	{ 0x06, KEY_UP },
+	{ 0x5a, KEY_LEFT },
+	{ 0x1b, KEY_RIGHT },
+	{ 0x1a, KEY_ENTER },
+	{ 0x16, KEY_DOWN },
+
+	{ 0x45, KEY_MENU },
+	{ 0x12, KEY_CONTEXT_MENU }, // MOUSE
+
+	{ 0x52, KEY_NUMERIC_1 },
+	{ 0x50, KEY_NUMERIC_2 },
+	{ 0x10, KEY_NUMERIC_3 },
+	{ 0x56, KEY_NUMERIC_4 },
+	{ 0x54, KEY_NUMERIC_5 },
+	{ 0x14, KEY_NUMERIC_6 },
+	{ 0x4e, KEY_NUMERIC_7 },
+	{ 0x4c, KEY_NUMERIC_8 },
+	{ 0x0c, KEY_NUMERIC_9 },
+	{ 0x22, KEY_INFO }, // SEARCH
+	{ 0x0f, KEY_NUMERIC_0 },
+	{ 0x51, KEY_BACKSPACE },
+
+};
+
+static struct rc_map_list mecool_m8s_pro_w_map = {
+	.map = {
+		.scan     = mecool_m8s_pro_w,
+		.size     = ARRAY_SIZE(mecool_m8s_pro_w),
+		.rc_proto = RC_PROTO_NEC,
+		.name     = RC_MAP_MECOOL_M8S_PRO_W,
+	}
+};
+
+static int __init init_rc_map_mecool_m8s_pro_w(void)
+{
+	return rc_map_register(&mecool_m8s_pro_w_map);
+}
+
+static void __exit exit_rc_map_mecool_m8s_pro_w(void)
+{
+	rc_map_unregister(&mecool_m8s_pro_w_map);
+}
+
+module_init(init_rc_map_mecool_m8s_pro_w)
+module_exit(exit_rc_map_mecool_m8s_pro_w)
+
+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 e4ddb3586d05..9b6f09a6fd3a 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -281,6 +281,7 @@ struct rc_map *rc_map_get(const char *name);
 #define RC_MAP_MANLI                     "rc-manli"
 #define RC_MAP_MECOOL_KII_PRO            "rc-mecool-kii-pro"
 #define RC_MAP_MECOOL_KIII_PRO           "rc-mecool-kiii-pro"
+#define RC_MAP_MECOOL_M8S_PRO_W          "rc-mecool-m8s-pro-w"
 #define RC_MAP_MEDION_X10                "rc-medion-x10"
 #define RC_MAP_MEDION_X10_DIGITAINER     "rc-medion-x10-digitainer"
 #define RC_MAP_MEDION_X10_OR2X           "rc-medion-x10-or2x"
-- 
2.17.1


debug log:

solving 52182001bc ...
found 52182001bc in https://yhetil.org/guix/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/

applying [1/1] https://yhetil.org/guix/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/
diff --git a/gnu/packages/patches/amlogic-0055-WIP-media-rc-add-keymap-for-MeCool-M8S-Pro-W-remote.patch b/gnu/packages/patches/amlogic-0055-WIP-media-rc-add-keymap-for-MeCool-M8S-Pro-W-remote.patch
new file mode 100644
index 0000000000..52182001bc

1:41: space before tab in indent.
 			rc-manli.o \
1:42: space before tab in indent.
 			rc-mecool-kiii-pro.o \
1:43: space before tab in indent.
 			rc-mecool-kii-pro.o \
1:46: space before tab in indent.
 			rc-medion-x10-digitainer.o \
1:47: space before tab in indent.
 			rc-medion-x10.o \
Checking patch gnu/packages/patches/amlogic-0055-WIP-media-rc-add-keymap-for-MeCool-M8S-Pro-W-remote.patch...
Applied patch gnu/packages/patches/amlogic-0055-WIP-media-rc-add-keymap-for-MeCool-M8S-Pro-W-remote.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

index at:
100644 52182001bca1b2815e372f00b776b420889bcd08	gnu/packages/patches/amlogic-0055-WIP-media-rc-add-keymap-for-MeCool-M8S-Pro-W-remote.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.