Skip to content

Commit

Permalink
[media] rc/keymaps: add keytable for ROC-RK3328-CC Remote Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
hzq authored and Kwiboo committed Jul 22, 2018
1 parent 13ff058 commit f141d31
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 @@ -83,6 +83,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-rc6-mce.o \
rc-real-audio-220-32-keys.o \
rc-reddo.o \
rc-roc-cc.o \
rc-snapstream-firefly.o \
rc-streamzap.o \
rc-tbs-nec.o \
Expand Down
52 changes: 52 additions & 0 deletions drivers/media/rc/keymaps/rc-roc-cc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* Keytable for ROC-RK3328-CC IR Remote Controller
*
* Copyright (c) 2017 ROC-RK3328-CC
*
* 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 roc_cc[] = {
{ 0x28d7, KEY_POWER },
{ 0xc837, KEY_MUTE },
{ 0xe01f, KEY_ENTER},
{ 0xc03f, KEY_UP },
{ 0x40bf, KEY_DOWN },
{ 0x708f, KEY_LEFT },
{ 0x58a7, KEY_RIGHT },
{ 0x1ae5, KEY_VOLUMEDOWN },
{ 0xd02f, KEY_VOLUMEUP },
{ 0x3ac5, KEY_WWW },
{ 0x807f, KEY_BACK },
{ 0x12ed, KEY_HOME },
};

static struct rc_map_list roc_cc_map = {
.map = {
.scan = roc_cc,
.size = ARRAY_SIZE(roc_cc),
.rc_type = RC_TYPE_NEC,
.name = RC_MAP_ROC_CC,
}
};

static int __init init_rc_map_roc_cc(void)
{
return rc_map_register(&roc_cc_map);
}

static void __exit exit_rc_map_roc_cc(void)
{
rc_map_unregister(&roc_cc_map);
}

module_init(init_rc_map_roc_cc)
module_exit(exit_rc_map_roc_cc)

MODULE_LICENSE("GPL");
MODULE_AUTHOR("ROC-RK3328-CC");
1 change: 1 addition & 0 deletions include/media/rc-map.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ void rc_map_init(void);
#define RC_MAP_RC6_MCE "rc-rc6-mce"
#define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys"
#define RC_MAP_REDDO "rc-reddo"
#define RC_MAP_ROC_CC "rc-roc-cc"
#define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly"
#define RC_MAP_STREAMZAP "rc-streamzap"
#define RC_MAP_TBS_NEC "rc-tbs-nec"
Expand Down

0 comments on commit f141d31

Please sign in to comment.