Skip to contentSkip to conversation

media: dt-bindings: rc: Add Ruwido Z3 RC-34 keymap

PATCH In review Fabio Estevam 3 participants 5 messages Oct 4 – Nov 22

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 media: dt-bindings: rc: Add Ruwido Z3 RC-34 keymap

From: Fabio Estevam <[email protected]>

Add rc-nec-ruwido-z3-rc34 to the list of supported keymaps.

---
Changes since v2:
- None. Only expanded the CC list.

Changes since v1:
- Newly introduced. (Sean)

 Documentation/devicetree/bindings/media/rc.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/media/rc.yaml +1 -0
index 43d84296e70d..827f4b0a8263 100644
@@ -105,6 +105,7 @@ properties:
       - rc-msi-tvanywhere-plus
       - rc-mygica-utv3
       - rc-nebula
+      - rc-nec-ruwido-z3-rc34
       - rc-nec-terratec-cinergy-xs
       - rc-norwood
       - rc-npgtech
Signature · 1 line
2.43.0
#1 lore raw

PATCH v3 2/2 media: rc: Add keymap for Ruwido Z3 RC-34 remote

From: Fabio Estevam <[email protected]>

Add keymap for the Ruwido Z3 RC-34 remote control.

---
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
drivers/media/rc/keymaps/Makefile +1 -0
index 38b84e34b225..525d203c0a94 100644
@@ -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 \
drivers/media/rc/keymaps/rc-nec-ruwido-z3-rc34.c new file +80 -0

80 lines not on this page · raw message

include/media/rc-map.h +1 -0
index f167c37179c8..290919a7247e 100644
@@ -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"
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH v3 2/2] media: rc: Add keymap for Ruwido Z3 RC-34 remote

Hi Sean,

Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Add keymap for the Ruwido Z3 RC-34 remote control.

---
Changes since v2:
- None.

A gentle ping.

Quoted 124 lines

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
drivers/media/rc/keymaps/Makefile +1 -0
index 38b84e34b225..525d203c0a94 100644
@@ -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 \
drivers/media/rc/keymaps/rc-nec-ruwido-z3-rc34.c new file +80 -0
new file mode 100644
index 000000000000..8a090772446d
@@ -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 <[email protected]>");
+MODULE_DESCRIPTION("Ruwido Z3 RC-34 remote keytable");
include/media/rc-map.h +1 -1
index f167c37179c8..290919a7247e 100644
@@ -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

maintainer
#3 lore raw

Re: [PATCH v3 2/2] media: rc: Add keymap for Ruwido Z3 RC-34 remote

Quoted 6 lines · Fabio Estevam

Hi Sean,

Quoted 3 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Quoted 8 lines
Quoted 6 lines

Add keymap for the Ruwido Z3 RC-34 remote control.

---
Changes since v2:
- None.

A gentle ping.

Sorry about the delay. It's now been merged into media-committers/next

Thanks

Sean

Quoted 125 lines
Quoted 125 lines

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
drivers/media/rc/keymaps/Makefile +1 -0
index 38b84e34b225..525d203c0a94 100644
@@ -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 \
drivers/media/rc/keymaps/rc-nec-ruwido-z3-rc34.c new file +80 -0
new file mode 100644
index 000000000000..8a090772446d
@@ -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 <[email protected]>");
+MODULE_DESCRIPTION("Ruwido Z3 RC-34 remote keytable");
include/media/rc-map.h +1 -1
index f167c37179c8..290919a7247e 100644
@@ -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

maintainer Acked-by on v3 1/2
#4 lore raw
In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Add rc-nec-ruwido-z3-rc34 to the list of supported keymaps.

---
Changes since v2:
- None. Only expanded the CC list.

Quoted 6 lines

Changes since v1:
- Newly introduced. (Sean)

 Documentation/devicetree/bindings/media/rc.yaml | 1 +
 1 file changed, 1 insertion(+)