From: Fabio Estevam <festevam@gmail.com>
To: sean@mess.org
Cc: mchehab@kernel.org, linux-media@vger.kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Fabio Estevam <festevam@nabladev.com>
Subject: [PATCH v3 2/2] media: rc: Add keymap for Ruwido Z3 RC-34 remote
Date: Sun, 4 Oct 2026 09:19:31 -0300 [thread overview]
Message-ID: <20261004121931.6746-2-festevam@gmail.com> (raw)
In-Reply-To: <20261004121931.6746-1-festevam@gmail.com>
From: Fabio Estevam <festevam@nabladev.com>
Add keymap for the Ruwido Z3 RC-34 remote control.
Signed-off-by: Fabio Estevam <festevam@nabladev.com>
---
Changes since v2:
- None.
Changes since v1:
- Use RC_PROTO_NECX. (Sean)
- Use media prefix in the Subject.
drivers/media/rc/keymaps/Makefile | 1 +
.../media/rc/keymaps/rc-nec-ruwido-z3-rc34.c | 80 +++++++++++++++++++
include/media/rc-map.h | 1 +
3 files changed, 82 insertions(+)
create mode 100644 drivers/media/rc/keymaps/rc-nec-ruwido-z3-rc34.c
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index 38b84e34b225..525d203c0a94 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -86,6 +86,7 @@ obj-$(CONFIG_RC_MAP) += \
rc-msi-tvanywhere-plus.o \
rc-mygica-utv3.o \
rc-nebula.o \
+ rc-nec-ruwido-z3-rc34.o \
rc-nec-terratec-cinergy-xs.o \
rc-norwood.o \
rc-npgtech.o \
diff --git a/drivers/media/rc/keymaps/rc-nec-ruwido-z3-rc34.c b/drivers/media/rc/keymaps/rc-nec-ruwido-z3-rc34.c
new file mode 100644
index 000000000000..8a090772446d
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-nec-ruwido-z3-rc34.c
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+//
+// Keytable for the Ruwido Z3 RC-34 remote
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+static struct rc_map_table nec_ruwido_z3_rc34[] = {
+ /* Ruwido Z3 RC-34, NECX address 0xe310 */
+ { 0xe3100f, KEY_POWER },
+ { 0xe31016, KEY_MENU },
+ { 0xe3100a, KEY_UP },
+ { 0xe3100b, KEY_DOWN },
+ { 0xe3100d, KEY_LEFT },
+ { 0xe3100c, KEY_RIGHT },
+ { 0xe31019, KEY_OK },
+ { 0xe3106a, KEY_BACK },
+ { 0xe31033, KEY_INFO },
+ { 0xe31066, KEY_DISPLAYTOGGLE },
+ { 0xe3101a, KEY_VOLUMEUP },
+ { 0xe31010, KEY_VOLUMEDOWN },
+ { 0xe31013, KEY_MUTE },
+ { 0xe31032, KEY_CHANNELUP },
+ { 0xe31031, KEY_CHANNELDOWN },
+ { 0xe31069, KEY_HP },
+ { 0xe31000, KEY_NUMERIC_1 },
+ { 0xe31001, KEY_NUMERIC_2 },
+ { 0xe31002, KEY_NUMERIC_3 },
+ { 0xe31003, KEY_NUMERIC_4 },
+ { 0xe31004, KEY_NUMERIC_5 },
+ { 0xe31005, KEY_NUMERIC_6 },
+ { 0xe31006, KEY_NUMERIC_7 },
+ { 0xe31007, KEY_NUMERIC_8 },
+ { 0xe31008, KEY_NUMERIC_9 },
+ { 0xe31030, KEY_NUMERIC_0 },
+ { 0xe31065, KEY_RED },
+ { 0xe31063, KEY_GREEN },
+ { 0xe31064, KEY_YELLOW },
+ { 0xe3106b, KEY_OPTION },
+ { 0xe31050, KEY_PLAY },
+ { 0xe31057, KEY_REWIND },
+ { 0xe31058, KEY_FASTFORWARD },
+ { 0xe31060, KEY_PROG1 },
+ { 0xe31061, KEY_PROG2 },
+ { 0xe31062, KEY_PROG3 },
+
+ /* RC-34 remote volume keys */
+ { 0x3506, KEY_VOLUMEUP },
+ { 0x3507, KEY_VOLUMEDOWN },
+
+ /* McIntosh HR070 remote volume keys */
+ { 0xca5542, KEY_VOLUMEUP },
+ { 0xca5543, KEY_VOLUMEDOWN },
+};
+
+static struct rc_map_list nec_ruwido_z3_rc34_map = {
+ .map = {
+ .scan = nec_ruwido_z3_rc34,
+ .size = ARRAY_SIZE(nec_ruwido_z3_rc34),
+ .rc_proto = RC_PROTO_NECX,
+ .name = RC_MAP_NEC_RUWIDO_Z3_RC34,
+ }
+};
+
+static int __init init_rc_map_nec_ruwido_z3_rc34(void)
+{
+ return rc_map_register(&nec_ruwido_z3_rc34_map);
+}
+
+static void __exit exit_rc_map_nec_ruwido_z3_rc34(void)
+{
+ rc_map_unregister(&nec_ruwido_z3_rc34_map);
+}
+
+module_init(init_rc_map_nec_ruwido_z3_rc34)
+module_exit(exit_rc_map_nec_ruwido_z3_rc34)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Fabio Estevam <festevam@gmail.com>");
+MODULE_DESCRIPTION("Ruwido Z3 RC-34 remote keytable");
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index f167c37179c8..290919a7247e 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -289,6 +289,7 @@ struct rc_map *rc_map_get(const char *name);
#define RC_MAP_MSI_TVANYWHERE_PLUS "rc-msi-tvanywhere-plus"
#define RC_MAP_MYGICA_UTV3 "rc-mygica-utv3"
#define RC_MAP_NEBULA "rc-nebula"
+#define RC_MAP_NEC_RUWIDO_Z3_RC34 "rc-nec-ruwido-z3-rc34"
#define RC_MAP_NEC_TERRATEC_CINERGY_XS "rc-nec-terratec-cinergy-xs"
#define RC_MAP_NORWOOD "rc-norwood"
#define RC_MAP_NPGTECH "rc-npgtech"
--
2.43.0
prev parent reply other threads:[~2026-10-04 12:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 12:19 [PATCH v3 1/2] media: dt-bindings: rc: Add Ruwido Z3 RC-34 keymap Fabio Estevam
2026-10-04 12:19 ` Fabio Estevam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261004121931.6746-2-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@nabladev.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sean@mess.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®