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

media: rc: Add tango keymap

Add a keymap for the Sigma Designs Vantage (dev board) remote control.

Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Marc Gonzalez and committed by
Mauro Carvalho Chehab
5248e34b a840f3c7

+94
+1
drivers/media/rc/keymaps/Makefile
··· 88 88 rc-reddo.o \ 89 89 rc-snapstream-firefly.o \ 90 90 rc-streamzap.o \ 91 + rc-tango.o \ 91 92 rc-tbs-nec.o \ 92 93 rc-technisat-ts35.o \ 93 94 rc-technisat-usb2.o \
+92
drivers/media/rc/keymaps/rc-tango.c
··· 1 + /* 2 + * Copyright (C) 2017 Sigma Designs 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License 6 + * version 2 as published by the Free Software Foundation. 7 + */ 8 + 9 + #include <linux/module.h> 10 + #include <media/rc-map.h> 11 + 12 + static struct rc_map_table tango_table[] = { 13 + { 0x4cb4a, KEY_POWER }, 14 + { 0x4cb48, KEY_FILE }, 15 + { 0x4cb0f, KEY_SETUP }, 16 + { 0x4cb4d, KEY_SUSPEND }, 17 + { 0x4cb4e, KEY_VOLUMEUP }, 18 + { 0x4cb44, KEY_EJECTCD }, 19 + { 0x4cb13, KEY_TV }, 20 + { 0x4cb51, KEY_MUTE }, 21 + { 0x4cb52, KEY_VOLUMEDOWN }, 22 + 23 + { 0x4cb41, KEY_1 }, 24 + { 0x4cb03, KEY_2 }, 25 + { 0x4cb42, KEY_3 }, 26 + { 0x4cb45, KEY_4 }, 27 + { 0x4cb07, KEY_5 }, 28 + { 0x4cb46, KEY_6 }, 29 + { 0x4cb55, KEY_7 }, 30 + { 0x4cb17, KEY_8 }, 31 + { 0x4cb56, KEY_9 }, 32 + { 0x4cb1b, KEY_0 }, 33 + { 0x4cb59, KEY_DELETE }, 34 + { 0x4cb5a, KEY_CAPSLOCK }, 35 + 36 + { 0x4cb47, KEY_BACK }, 37 + { 0x4cb05, KEY_SWITCHVIDEOMODE }, 38 + { 0x4cb06, KEY_UP }, 39 + { 0x4cb43, KEY_LEFT }, 40 + { 0x4cb01, KEY_RIGHT }, 41 + { 0x4cb0a, KEY_DOWN }, 42 + { 0x4cb02, KEY_ENTER }, 43 + { 0x4cb4b, KEY_INFO }, 44 + { 0x4cb09, KEY_HOME }, 45 + 46 + { 0x4cb53, KEY_MENU }, 47 + { 0x4cb12, KEY_PREVIOUS }, 48 + { 0x4cb50, KEY_PLAY }, 49 + { 0x4cb11, KEY_NEXT }, 50 + { 0x4cb4f, KEY_TITLE }, 51 + { 0x4cb0e, KEY_REWIND }, 52 + { 0x4cb4c, KEY_STOP }, 53 + { 0x4cb0d, KEY_FORWARD }, 54 + { 0x4cb57, KEY_MEDIA_REPEAT }, 55 + { 0x4cb16, KEY_ANGLE }, 56 + { 0x4cb54, KEY_PAUSE }, 57 + { 0x4cb15, KEY_SLOW }, 58 + { 0x4cb5b, KEY_TIME }, 59 + { 0x4cb1a, KEY_AUDIO }, 60 + { 0x4cb58, KEY_SUBTITLE }, 61 + { 0x4cb19, KEY_ZOOM }, 62 + 63 + { 0x4cb5f, KEY_RED }, 64 + { 0x4cb1e, KEY_GREEN }, 65 + { 0x4cb5c, KEY_YELLOW }, 66 + { 0x4cb1d, KEY_BLUE }, 67 + }; 68 + 69 + static struct rc_map_list tango_map = { 70 + .map = { 71 + .scan = tango_table, 72 + .size = ARRAY_SIZE(tango_table), 73 + .rc_proto = RC_PROTO_NECX, 74 + .name = RC_MAP_TANGO, 75 + } 76 + }; 77 + 78 + static int __init init_rc_map_tango(void) 79 + { 80 + return rc_map_register(&tango_map); 81 + } 82 + 83 + static void __exit exit_rc_map_tango(void) 84 + { 85 + rc_map_unregister(&tango_map); 86 + } 87 + 88 + module_init(init_rc_map_tango) 89 + module_exit(exit_rc_map_tango) 90 + 91 + MODULE_AUTHOR("Sigma Designs"); 92 + MODULE_LICENSE("GPL");
+1
include/media/rc-map.h
··· 300 300 #define RC_MAP_REDDO "rc-reddo" 301 301 #define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly" 302 302 #define RC_MAP_STREAMZAP "rc-streamzap" 303 + #define RC_MAP_TANGO "rc-tango" 303 304 #define RC_MAP_TBS_NEC "rc-tbs-nec" 304 305 #define RC_MAP_TECHNISAT_TS35 "rc-technisat-ts35" 305 306 #define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2"