Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * MSI DIGIVOX mini III remote controller keytable
0004  *
0005  * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
0006  */
0007 
0008 #include <media/rc-map.h>
0009 #include <linux/module.h>
0010 
0011 /*
0012  * Derived from MSI DIGIVOX mini III remote (rc-msi-digivox-iii.c)
0013  *
0014  * Differences between these remotes are:
0015  *
0016  * 1) scancode 0x61d601 is mapped to different button:
0017  *    MSI DIGIVOX mini III   "Source" = KEY_VIDEO
0018  *    Reddo                     "EPG" = KEY_EPG
0019  *
0020  * 2) Reddo remote has less buttons. Missing buttons are: colored buttons,
0021  *    navigation buttons and main power button.
0022  */
0023 
0024 static struct rc_map_table reddo[] = {
0025     { 0x61d601, KEY_EPG },             /* EPG */
0026     { 0x61d602, KEY_NUMERIC_3 },
0027     { 0x61d604, KEY_NUMERIC_1 },
0028     { 0x61d605, KEY_NUMERIC_5 },
0029     { 0x61d606, KEY_NUMERIC_6 },
0030     { 0x61d607, KEY_CHANNELDOWN },     /* CH- */
0031     { 0x61d608, KEY_NUMERIC_2 },
0032     { 0x61d609, KEY_CHANNELUP },       /* CH+ */
0033     { 0x61d60a, KEY_NUMERIC_9 },
0034     { 0x61d60b, KEY_ZOOM },            /* Zoom */
0035     { 0x61d60c, KEY_NUMERIC_7 },
0036     { 0x61d60d, KEY_NUMERIC_8 },
0037     { 0x61d60e, KEY_VOLUMEUP },        /* Vol+ */
0038     { 0x61d60f, KEY_NUMERIC_4 },
0039     { 0x61d610, KEY_ESC },             /* [back up arrow] */
0040     { 0x61d611, KEY_NUMERIC_0 },
0041     { 0x61d612, KEY_OK },              /* [enter arrow] */
0042     { 0x61d613, KEY_VOLUMEDOWN },      /* Vol- */
0043     { 0x61d614, KEY_RECORD },          /* Rec */
0044     { 0x61d615, KEY_STOP },            /* Stop */
0045     { 0x61d616, KEY_PLAY },            /* Play */
0046     { 0x61d617, KEY_MUTE },            /* Mute */
0047     { 0x61d643, KEY_POWER2 },          /* [red power button] */
0048 };
0049 
0050 static struct rc_map_list reddo_map = {
0051     .map = {
0052         .scan     = reddo,
0053         .size     = ARRAY_SIZE(reddo),
0054         .rc_proto = RC_PROTO_NECX,
0055         .name     = RC_MAP_REDDO,
0056     }
0057 };
0058 
0059 static int __init init_rc_map_reddo(void)
0060 {
0061     return rc_map_register(&reddo_map);
0062 }
0063 
0064 static void __exit exit_rc_map_reddo(void)
0065 {
0066     rc_map_unregister(&reddo_map);
0067 }
0068 
0069 module_init(init_rc_map_reddo)
0070 module_exit(exit_rc_map_reddo)
0071 
0072 MODULE_LICENSE("GPL");
0073 MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");