cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

rc-it913x-v1.c (2683B)


      1// SPDX-License-Identifier: GPL-2.0-or-later
      2/* ITE Generic remotes Version 1
      3 *
      4 * Copyright (C) 2012 Malcolm Priestley (tvboxspy@gmail.com)
      5 */
      6
      7#include <media/rc-map.h>
      8#include <linux/module.h>
      9
     10
     11static struct rc_map_table it913x_v1_rc[] = {
     12	/* Type 1 */
     13	{ 0x61d601, KEY_VIDEO },           /* Source */
     14	{ 0x61d602, KEY_NUMERIC_3 },
     15	{ 0x61d603, KEY_POWER },           /* ShutDown */
     16	{ 0x61d604, KEY_NUMERIC_1 },
     17	{ 0x61d605, KEY_NUMERIC_5 },
     18	{ 0x61d606, KEY_NUMERIC_6 },
     19	{ 0x61d607, KEY_CHANNELDOWN },     /* CH- */
     20	{ 0x61d608, KEY_NUMERIC_2 },
     21	{ 0x61d609, KEY_CHANNELUP },       /* CH+ */
     22	{ 0x61d60a, KEY_NUMERIC_9 },
     23	{ 0x61d60b, KEY_ZOOM },            /* Zoom */
     24	{ 0x61d60c, KEY_NUMERIC_7 },
     25	{ 0x61d60d, KEY_NUMERIC_8 },
     26	{ 0x61d60e, KEY_VOLUMEUP },        /* Vol+ */
     27	{ 0x61d60f, KEY_NUMERIC_4 },
     28	{ 0x61d610, KEY_ESC },             /* [back up arrow] */
     29	{ 0x61d611, KEY_NUMERIC_0 },
     30	{ 0x61d612, KEY_OK },              /* [enter arrow] */
     31	{ 0x61d613, KEY_VOLUMEDOWN },      /* Vol- */
     32	{ 0x61d614, KEY_RECORD },          /* Rec */
     33	{ 0x61d615, KEY_STOP },            /* Stop */
     34	{ 0x61d616, KEY_PLAY },            /* Play */
     35	{ 0x61d617, KEY_MUTE },            /* Mute */
     36	{ 0x61d618, KEY_UP },
     37	{ 0x61d619, KEY_DOWN },
     38	{ 0x61d61a, KEY_LEFT },
     39	{ 0x61d61b, KEY_RIGHT },
     40	{ 0x61d61c, KEY_RED },
     41	{ 0x61d61d, KEY_GREEN },
     42	{ 0x61d61e, KEY_YELLOW },
     43	{ 0x61d61f, KEY_BLUE },
     44	{ 0x61d643, KEY_POWER2 },          /* [red power button] */
     45	/* Type 2 - 20 buttons */
     46	{ 0x807f0d, KEY_NUMERIC_0 },
     47	{ 0x807f04, KEY_NUMERIC_1 },
     48	{ 0x807f05, KEY_NUMERIC_2 },
     49	{ 0x807f06, KEY_NUMERIC_3 },
     50	{ 0x807f07, KEY_NUMERIC_4 },
     51	{ 0x807f08, KEY_NUMERIC_5 },
     52	{ 0x807f09, KEY_NUMERIC_6 },
     53	{ 0x807f0a, KEY_NUMERIC_7 },
     54	{ 0x807f1b, KEY_NUMERIC_8 },
     55	{ 0x807f1f, KEY_NUMERIC_9 },
     56	{ 0x807f12, KEY_POWER },
     57	{ 0x807f01, KEY_MEDIA_REPEAT}, /* Recall */
     58	{ 0x807f19, KEY_PAUSE }, /* Timeshift */
     59	{ 0x807f1e, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */
     60	{ 0x807f03, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/
     61	{ 0x807f1a, KEY_CHANNELUP },
     62	{ 0x807f02, KEY_CHANNELDOWN },
     63	{ 0x807f0c, KEY_ZOOM },
     64	{ 0x807f00, KEY_RECORD },
     65	{ 0x807f0e, KEY_STOP },
     66};
     67
     68static struct rc_map_list it913x_v1_map = {
     69	.map = {
     70		.scan     = it913x_v1_rc,
     71		.size     = ARRAY_SIZE(it913x_v1_rc),
     72		.rc_proto = RC_PROTO_NECX,
     73		.name     = RC_MAP_IT913X_V1,
     74	}
     75};
     76
     77static int __init init_rc_it913x_v1_map(void)
     78{
     79	return rc_map_register(&it913x_v1_map);
     80}
     81
     82static void __exit exit_rc_it913x_v1_map(void)
     83{
     84	rc_map_unregister(&it913x_v1_map);
     85}
     86
     87module_init(init_rc_it913x_v1_map)
     88module_exit(exit_rc_it913x_v1_map)
     89
     90MODULE_LICENSE("GPL");
     91MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com");