LCOV - code coverage report
Current view: top level - drivers/media/rc/keymaps - rc-reddo.c (source / functions) Hit Total Coverage
Test: Real Lines: 2 5 40.0 %
Date: 2020-10-17 15:46:16 Functions: 0 2 0.0 %
Legend: Neither, QEMU, Real, Both Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // SPDX-License-Identifier: GPL-2.0-or-later
       2                 :            : /*
       3                 :            :  * MSI DIGIVOX mini III remote controller keytable
       4                 :            :  *
       5                 :            :  * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
       6                 :            :  */
       7                 :            : 
       8                 :            : #include <media/rc-map.h>
       9                 :            : #include <linux/module.h>
      10                 :            : 
      11                 :            : /*
      12                 :            :  * Derived from MSI DIGIVOX mini III remote (rc-msi-digivox-iii.c)
      13                 :            :  *
      14                 :            :  * Differences between these remotes are:
      15                 :            :  *
      16                 :            :  * 1) scancode 0x61d601 is mapped to different button:
      17                 :            :  *    MSI DIGIVOX mini III   "Source" = KEY_VIDEO
      18                 :            :  *    Reddo                     "EPG" = KEY_EPG
      19                 :            :  *
      20                 :            :  * 2) Reddo remote has less buttons. Missing buttons are: colored buttons,
      21                 :            :  *    navigation buttons and main power button.
      22                 :            :  */
      23                 :            : 
      24                 :            : static struct rc_map_table reddo[] = {
      25                 :            :         { 0x61d601, KEY_EPG },             /* EPG */
      26                 :            :         { 0x61d602, KEY_NUMERIC_3 },
      27                 :            :         { 0x61d604, KEY_NUMERIC_1 },
      28                 :            :         { 0x61d605, KEY_NUMERIC_5 },
      29                 :            :         { 0x61d606, KEY_NUMERIC_6 },
      30                 :            :         { 0x61d607, KEY_CHANNELDOWN },     /* CH- */
      31                 :            :         { 0x61d608, KEY_NUMERIC_2 },
      32                 :            :         { 0x61d609, KEY_CHANNELUP },       /* CH+ */
      33                 :            :         { 0x61d60a, KEY_NUMERIC_9 },
      34                 :            :         { 0x61d60b, KEY_ZOOM },            /* Zoom */
      35                 :            :         { 0x61d60c, KEY_NUMERIC_7 },
      36                 :            :         { 0x61d60d, KEY_NUMERIC_8 },
      37                 :            :         { 0x61d60e, KEY_VOLUMEUP },        /* Vol+ */
      38                 :            :         { 0x61d60f, KEY_NUMERIC_4 },
      39                 :            :         { 0x61d610, KEY_ESC },             /* [back up arrow] */
      40                 :            :         { 0x61d611, KEY_NUMERIC_0 },
      41                 :            :         { 0x61d612, KEY_OK },              /* [enter arrow] */
      42                 :            :         { 0x61d613, KEY_VOLUMEDOWN },      /* Vol- */
      43                 :            :         { 0x61d614, KEY_RECORD },          /* Rec */
      44                 :            :         { 0x61d615, KEY_STOP },            /* Stop */
      45                 :            :         { 0x61d616, KEY_PLAY },            /* Play */
      46                 :            :         { 0x61d617, KEY_MUTE },            /* Mute */
      47                 :            :         { 0x61d643, KEY_POWER2 },          /* [red power button] */
      48                 :            : };
      49                 :            : 
      50                 :            : static struct rc_map_list reddo_map = {
      51                 :            :         .map = {
      52                 :            :                 .scan     = reddo,
      53                 :            :                 .size     = ARRAY_SIZE(reddo),
      54                 :            :                 .rc_proto = RC_PROTO_NECX,
      55                 :            :                 .name     = RC_MAP_REDDO,
      56                 :            :         }
      57                 :            : };
      58                 :            : 
      59                 :          3 : static int __init init_rc_map_reddo(void)
      60                 :            : {
      61                 :          3 :         return rc_map_register(&reddo_map);
      62                 :            : }
      63                 :            : 
      64                 :          0 : static void __exit exit_rc_map_reddo(void)
      65                 :            : {
      66                 :          0 :         rc_map_unregister(&reddo_map);
      67                 :          0 : }
      68                 :            : 
      69                 :            : module_init(init_rc_map_reddo)
      70                 :            : module_exit(exit_rc_map_reddo)
      71                 :            : 
      72                 :            : MODULE_LICENSE("GPL");
      73                 :            : MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
    

Generated by: LCOV version 1.14