1*e30399e1SChristian Hewitt // SPDX-License-Identifier: GPL-2.0+ 2*e30399e1SChristian Hewitt // Copyright (c) 2018 Christian Hewitt 3*e30399e1SChristian Hewitt 4*e30399e1SChristian Hewitt #include <media/rc-map.h> 5*e30399e1SChristian Hewitt #include <linux/module.h> 6*e30399e1SChristian Hewitt 7*e30399e1SChristian Hewitt /* 8*e30399e1SChristian Hewitt * Keymap for the Tanix TX3 mini STB remote control 9*e30399e1SChristian Hewitt */ 10*e30399e1SChristian Hewitt 11*e30399e1SChristian Hewitt static struct rc_map_table tanix_tx3mini[] = { 12*e30399e1SChristian Hewitt { 0x8051, KEY_POWER }, 13*e30399e1SChristian Hewitt { 0x804d, KEY_MUTE }, 14*e30399e1SChristian Hewitt 15*e30399e1SChristian Hewitt { 0x8009, KEY_RED }, 16*e30399e1SChristian Hewitt { 0x8011, KEY_GREEN }, 17*e30399e1SChristian Hewitt { 0x8054, KEY_YELLOW }, 18*e30399e1SChristian Hewitt { 0x804f, KEY_BLUE }, 19*e30399e1SChristian Hewitt 20*e30399e1SChristian Hewitt { 0x8056, KEY_VOLUMEDOWN }, 21*e30399e1SChristian Hewitt { 0x80bd, KEY_PREVIOUS }, 22*e30399e1SChristian Hewitt { 0x80bb, KEY_NEXT }, 23*e30399e1SChristian Hewitt { 0x804e, KEY_VOLUMEUP }, 24*e30399e1SChristian Hewitt 25*e30399e1SChristian Hewitt { 0x8053, KEY_HOME }, 26*e30399e1SChristian Hewitt { 0x801b, KEY_BACK }, 27*e30399e1SChristian Hewitt 28*e30399e1SChristian Hewitt { 0x8026, KEY_UP }, 29*e30399e1SChristian Hewitt { 0x8028, KEY_DOWN }, 30*e30399e1SChristian Hewitt { 0x8025, KEY_LEFT }, 31*e30399e1SChristian Hewitt { 0x8027, KEY_RIGHT }, 32*e30399e1SChristian Hewitt { 0x800d, KEY_OK }, 33*e30399e1SChristian Hewitt 34*e30399e1SChristian Hewitt { 0x8049, KEY_MENU }, 35*e30399e1SChristian Hewitt { 0x8052, KEY_EPG }, // mouse 36*e30399e1SChristian Hewitt 37*e30399e1SChristian Hewitt { 0x8031, KEY_1 }, 38*e30399e1SChristian Hewitt { 0x8032, KEY_2 }, 39*e30399e1SChristian Hewitt { 0x8033, KEY_3 }, 40*e30399e1SChristian Hewitt 41*e30399e1SChristian Hewitt { 0x8034, KEY_4 }, 42*e30399e1SChristian Hewitt { 0x8035, KEY_5 }, 43*e30399e1SChristian Hewitt { 0x8036, KEY_6 }, 44*e30399e1SChristian Hewitt 45*e30399e1SChristian Hewitt { 0x8037, KEY_7 }, 46*e30399e1SChristian Hewitt { 0x8038, KEY_8 }, 47*e30399e1SChristian Hewitt { 0x8039, KEY_9 }, 48*e30399e1SChristian Hewitt 49*e30399e1SChristian Hewitt { 0x8058, KEY_SUBTITLE }, // 1/a 50*e30399e1SChristian Hewitt { 0x8030, KEY_0 }, 51*e30399e1SChristian Hewitt { 0x8044, KEY_DELETE }, 52*e30399e1SChristian Hewitt }; 53*e30399e1SChristian Hewitt 54*e30399e1SChristian Hewitt static struct rc_map_list tanix_tx3mini_map = { 55*e30399e1SChristian Hewitt .map = { 56*e30399e1SChristian Hewitt .scan = tanix_tx3mini, 57*e30399e1SChristian Hewitt .size = ARRAY_SIZE(tanix_tx3mini), 58*e30399e1SChristian Hewitt .rc_proto = RC_PROTO_NEC, 59*e30399e1SChristian Hewitt .name = RC_MAP_TANIX_TX3MINI, 60*e30399e1SChristian Hewitt } 61*e30399e1SChristian Hewitt }; 62*e30399e1SChristian Hewitt 63*e30399e1SChristian Hewitt static int __init init_rc_map_tanix_tx3mini(void) 64*e30399e1SChristian Hewitt { 65*e30399e1SChristian Hewitt return rc_map_register(&tanix_tx3mini_map); 66*e30399e1SChristian Hewitt } 67*e30399e1SChristian Hewitt 68*e30399e1SChristian Hewitt static void __exit exit_rc_map_tanix_tx3mini(void) 69*e30399e1SChristian Hewitt { 70*e30399e1SChristian Hewitt rc_map_unregister(&tanix_tx3mini_map); 71*e30399e1SChristian Hewitt } 72*e30399e1SChristian Hewitt 73*e30399e1SChristian Hewitt module_init(init_rc_map_tanix_tx3mini) 74*e30399e1SChristian Hewitt module_exit(exit_rc_map_tanix_tx3mini) 75*e30399e1SChristian Hewitt 76*e30399e1SChristian Hewitt MODULE_LICENSE("GPL"); 77*e30399e1SChristian Hewitt MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>"); 78