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

media: rc: add keymap for Tronsmart Vega S95/S96 remote

Add a keymap for the Tronsmart Vega S95 and S96 Android (Amlogic S905/S912)
STB devices. Both use the same IR 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
22cb099d 0f123f82

+56
+1
drivers/media/rc/keymaps/Makefile
··· 114 114 rc-tt-1500.o \ 115 115 rc-twinhan-dtv-cab-ci.o \ 116 116 rc-twinhan1027.o \ 117 + rc-vega-s9x.o \ 117 118 rc-videomate-m1f.o \ 118 119 rc-videomate-s350.o \ 119 120 rc-videomate-tv-pvr.o \
+54
drivers/media/rc/keymaps/rc-vega-s9x.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com> 4 + 5 + #include <media/rc-map.h> 6 + #include <linux/module.h> 7 + 8 + // 9 + // Keytable for the Tronsmart Vega S9x remote control 10 + // 11 + 12 + static struct rc_map_table vega_s9x[] = { 13 + { 0x18, KEY_POWER }, 14 + { 0x17, KEY_MUTE }, // mouse 15 + 16 + { 0x46, KEY_UP }, 17 + { 0x47, KEY_LEFT }, 18 + { 0x55, KEY_OK }, 19 + { 0x15, KEY_RIGHT }, 20 + { 0x16, KEY_DOWN }, 21 + 22 + { 0x06, KEY_HOME }, 23 + { 0x42, KEY_PLAYPAUSE}, 24 + { 0x40, KEY_BACK }, 25 + 26 + { 0x14, KEY_VOLUMEDOWN }, 27 + { 0x04, KEY_MENU }, 28 + { 0x10, KEY_VOLUMEUP }, 29 + }; 30 + 31 + static struct rc_map_list vega_s9x_map = { 32 + .map = { 33 + .scan = vega_s9x, 34 + .size = ARRAY_SIZE(vega_s9x), 35 + .rc_proto = RC_PROTO_NEC, 36 + .name = RC_MAP_VEGA_S9X, 37 + } 38 + }; 39 + 40 + static int __init init_rc_map_vega_s9x(void) 41 + { 42 + return rc_map_register(&vega_s9x_map); 43 + } 44 + 45 + static void __exit exit_rc_map_vega_s9x(void) 46 + { 47 + rc_map_unregister(&vega_s9x_map); 48 + } 49 + 50 + module_init(init_rc_map_vega_s9x) 51 + module_exit(exit_rc_map_vega_s9x) 52 + 53 + MODULE_LICENSE("GPL"); 54 + MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
+1
include/media/rc-map.h
··· 268 268 #define RC_MAP_TT_1500 "rc-tt-1500" 269 269 #define RC_MAP_TWINHAN_DTV_CAB_CI "rc-twinhan-dtv-cab-ci" 270 270 #define RC_MAP_TWINHAN_VP1027_DVBS "rc-twinhan1027" 271 + #define RC_MAP_VEGA_S9X "rc-vega-s9x" 271 272 #define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100" 272 273 #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" 273 274 #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr"