Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: rc: add keymap for WeTek Hub remote

The WeTek Hub Android STB ships with a simple NEC remote.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Christian Hewitt and committed by
Mauro Carvalho Chehab
37307897 7bb53f36

+55
+1
drivers/media/rc/keymaps/Makefile
··· 116 116 rc-videomate-m1f.o \ 117 117 rc-videomate-s350.o \ 118 118 rc-videomate-tv-pvr.o \ 119 + rc-wetek-hub.o \ 119 120 rc-winfast.o \ 120 121 rc-winfast-usbii-deluxe.o \ 121 122 rc-su3000.o \
+53
drivers/media/rc/keymaps/rc-wetek-hub.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // Copyright (c) 2018 Christian Hewitt 3 + 4 + #include <media/rc-map.h> 5 + #include <linux/module.h> 6 + 7 + /* 8 + * This keymap is used with the WeTek Hub STB. 9 + */ 10 + 11 + static struct rc_map_table wetek_hub[] = { 12 + { 0x77f1, KEY_POWER }, 13 + 14 + { 0x77f2, KEY_HOME }, 15 + { 0x77f3, KEY_MUTE }, // mouse 16 + 17 + { 0x77f4, KEY_UP }, 18 + { 0x77f5, KEY_DOWN }, 19 + { 0x77f6, KEY_LEFT }, 20 + { 0x77f7, KEY_RIGHT }, 21 + { 0x77f8, KEY_OK }, 22 + 23 + { 0x77f9, KEY_BACK }, 24 + { 0x77fa, KEY_MENU }, 25 + 26 + { 0x77fb, KEY_VOLUMEUP }, 27 + { 0x77fc, KEY_VOLUMEDOWN }, 28 + }; 29 + 30 + static struct rc_map_list wetek_hub_map = { 31 + .map = { 32 + .scan = wetek_hub, 33 + .size = ARRAY_SIZE(wetek_hub), 34 + .rc_proto = RC_PROTO_NEC, 35 + .name = RC_MAP_WETEK_HUB, 36 + } 37 + }; 38 + 39 + static int __init init_rc_map_wetek_hub(void) 40 + { 41 + return rc_map_register(&wetek_hub_map); 42 + } 43 + 44 + static void __exit exit_rc_map_wetek_hub(void) 45 + { 46 + rc_map_unregister(&wetek_hub_map); 47 + } 48 + 49 + module_init(init_rc_map_wetek_hub) 50 + module_exit(exit_rc_map_wetek_hub) 51 + 52 + MODULE_LICENSE("GPL"); 53 + MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");
+1
include/media/rc-map.h
··· 270 270 #define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100" 271 271 #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" 272 272 #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" 273 + #define RC_MAP_WETEK_HUB "rc-wetek-hub" 273 274 #define RC_MAP_WINFAST "rc-winfast" 274 275 #define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe" 275 276 #define RC_MAP_SU3000 "rc-su3000"