Skip to content

Commit

Permalink
[media] rc/keymaps: add keytable for T-Chip TRN9 IR Remote Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwiboo committed Sep 1, 2018
1 parent 39d4f59 commit 67503f3
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/rc/keymaps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-tt-1500.o \
rc-twinhan-dtv-cab-ci.o \
rc-twinhan1027.o \
rc-trn9.o \
rc-wetek-hub.o \
rc-wetek-play-2.o \
rc-videomate-m1f.o \
Expand Down
52 changes: 52 additions & 0 deletions drivers/media/rc/keymaps/rc-trn9.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* Keytable for T-Chip TRN9 IR Remote Controller
*
* Copyright (c) 2018 Omegamoon
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/

#include <media/rc-map.h>
#include <linux/module.h>

static struct rc_map_table trn9[] = {
{ 0x0014, KEY_POWER },
{ 0x0013, KEY_MENU },
{ 0x0003, KEY_UP },
{ 0x0002, KEY_DOWN },
{ 0x000e, KEY_LEFT },
{ 0x001a, KEY_RIGHT },
{ 0x0007, KEY_OK },
{ 0x0058, KEY_VOLUMEDOWN },
{ 0x005c, KEY_MUTE },
{ 0x000b, KEY_VOLUMEUP },
{ 0x0001, KEY_BACK },
{ 0x0048, KEY_HOME },
};

static struct rc_map_list trn9_map = {
.map = {
.scan = trn9,
.size = ARRAY_SIZE(trn9),
.rc_type = RC_TYPE_NEC,
.name = RC_MAP_TRN9,
}
};

static int __init init_rc_map_trn9(void)
{
return rc_map_register(&trn9_map);
}

static void __exit exit_rc_map_trn9(void)
{
rc_map_unregister(&trn9_map);
}

module_init(init_rc_map_trn9)
module_exit(exit_rc_map_trn9)

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Omegamoon");
1 change: 1 addition & 0 deletions include/media/rc-map.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ void rc_map_init(void);
#define RC_MAP_TT_1500 "rc-tt-1500"
#define RC_MAP_TWINHAN_DTV_CAB_CI "rc-twinhan-dtv-cab-ci"
#define RC_MAP_TWINHAN_VP1027_DVBS "rc-twinhan1027"
#define RC_MAP_TRN9 "rc-trn9"
#define RC_MAP_WETEK_HUB "rc-wetek-hub"
#define RC_MAP_WETEK_PLAY_2 "rc-wetek-play-2"
#define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100"
Expand Down

0 comments on commit 67503f3

Please sign in to comment.