70 lines · c
1// SPDX-License-Identifier: GPL-2.0+2// Copyright (c) 2018 Christian Hewitt3 4#include <media/rc-map.h>5#include <linux/module.h>6 7/*8 * Keymap for the Tanix TX5 max STB remote control9 */10 11static struct rc_map_table tanix_tx5max[] = {12 { 0x40404d, KEY_POWER },13 { 0x404043, KEY_MUTE },14 15 { 0x404017, KEY_VOLUMEDOWN },16 { 0x404018, KEY_VOLUMEUP },17 18 { 0x40400b, KEY_UP },19 { 0x404010, KEY_LEFT },20 { 0x404011, KEY_RIGHT },21 { 0x40400e, KEY_DOWN },22 { 0x40400d, KEY_OK },23 24 { 0x40401a, KEY_HOME },25 { 0x404045, KEY_MENU },26 { 0x404042, KEY_BACK },27 28 { 0x404001, KEY_1 },29 { 0x404002, KEY_2 },30 { 0x404003, KEY_3 },31 32 { 0x404004, KEY_4 },33 { 0x404005, KEY_5 },34 { 0x404006, KEY_6 },35 36 { 0x404007, KEY_7 },37 { 0x404008, KEY_8 },38 { 0x404009, KEY_9 },39 40 { 0x404047, KEY_SUBTITLE }, // mouse41 { 0x404000, KEY_0 },42 { 0x40400c, KEY_DELETE },43};44 45static struct rc_map_list tanix_tx5max_map = {46 .map = {47 .scan = tanix_tx5max,48 .size = ARRAY_SIZE(tanix_tx5max),49 .rc_proto = RC_PROTO_NECX,50 .name = RC_MAP_TANIX_TX5MAX,51 }52};53 54static int __init init_rc_map_tanix_tx5max(void)55{56 return rc_map_register(&tanix_tx5max_map);57}58 59static void __exit exit_rc_map_tanix_tx5max(void)60{61 rc_map_unregister(&tanix_tx5max_map);62}63 64module_init(init_rc_map_tanix_tx5max)65module_exit(exit_rc_map_tanix_tx5max)66 67MODULE_LICENSE("GPL");68MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");69MODULE_DESCRIPTION("Tanix TX5 max STB remote controller keytable");70