LCOV - code coverage report
Current view: top level - drivers/media/rc/keymaps - rc-videostrong-kii-pro.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+
       2                 :            : //
       3                 :            : // Copyright (C) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
       4                 :            : 
       5                 :            : #include <media/rc-map.h>
       6                 :            : #include <linux/module.h>
       7                 :            : 
       8                 :            : //
       9                 :            : // Keytable for the Videostrong KII Pro STB remote control
      10                 :            : //
      11                 :            : 
      12                 :            : static struct rc_map_table kii_pro[] = {
      13                 :            :         { 0x59, KEY_POWER },
      14                 :            :         { 0x19, KEY_MUTE },
      15                 :            :         { 0x42, KEY_RED },
      16                 :            :         { 0x40, KEY_GREEN },
      17                 :            :         { 0x00, KEY_YELLOW },
      18                 :            :         { 0x03, KEY_BLUE },
      19                 :            :         { 0x4a, KEY_BACK },
      20                 :            :         { 0x48, KEY_FORWARD },
      21                 :            :         { 0x08, KEY_PREVIOUSSONG},
      22                 :            :         { 0x0b, KEY_NEXTSONG},
      23                 :            :         { 0x46, KEY_PLAYPAUSE },
      24                 :            :         { 0x44, KEY_STOP },
      25                 :            :         { 0x1f, KEY_FAVORITES}, //KEY_F5?
      26                 :            :         { 0x04, KEY_PVR },
      27                 :            :         { 0x4d, KEY_EPG },
      28                 :            :         { 0x02, KEY_INFO },
      29                 :            :         { 0x09, KEY_SUBTITLE },
      30                 :            :         { 0x01, KEY_AUDIO },
      31                 :            :         { 0x0d, KEY_HOMEPAGE },
      32                 :            :         { 0x11, KEY_TV },       // DTV ?
      33                 :            :         { 0x06, KEY_UP },
      34                 :            :         { 0x5a, KEY_LEFT },
      35                 :            :         { 0x1a, KEY_ENTER },    // KEY_OK ?
      36                 :            :         { 0x1b, KEY_RIGHT },
      37                 :            :         { 0x16, KEY_DOWN },
      38                 :            :         { 0x45, KEY_MENU },
      39                 :            :         { 0x05, KEY_ESC },
      40                 :            :         { 0x13, KEY_VOLUMEUP },
      41                 :            :         { 0x17, KEY_VOLUMEDOWN },
      42                 :            :         { 0x58, KEY_APPSELECT },
      43                 :            :         { 0x12, KEY_VENDOR },   // mouse
      44                 :            :         { 0x55, KEY_PAGEUP },   // KEY_CHANNELUP ?
      45                 :            :         { 0x15, KEY_PAGEDOWN }, // KEY_CHANNELDOWN ?
      46                 :            :         { 0x52, KEY_1 },
      47                 :            :         { 0x50, KEY_2 },
      48                 :            :         { 0x10, KEY_3 },
      49                 :            :         { 0x56, KEY_4 },
      50                 :            :         { 0x54, KEY_5 },
      51                 :            :         { 0x14, KEY_6 },
      52                 :            :         { 0x4e, KEY_7 },
      53                 :            :         { 0x4c, KEY_8 },
      54                 :            :         { 0x0c, KEY_9 },
      55                 :            :         { 0x18, KEY_WWW },      // KEY_F7
      56                 :            :         { 0x0f, KEY_0 },
      57                 :            :         { 0x51, KEY_BACKSPACE },
      58                 :            : };
      59                 :            : 
      60                 :            : static struct rc_map_list kii_pro_map = {
      61                 :            :         .map = {
      62                 :            :                 .scan     = kii_pro,
      63                 :            :                 .size     = ARRAY_SIZE(kii_pro),
      64                 :            :                 .rc_proto = RC_PROTO_NEC,
      65                 :            :                 .name     = RC_MAP_KII_PRO,
      66                 :            :         }
      67                 :            : };
      68                 :            : 
      69                 :          3 : static int __init init_rc_map_kii_pro(void)
      70                 :            : {
      71                 :          3 :         return rc_map_register(&kii_pro_map);
      72                 :            : }
      73                 :            : 
      74                 :          0 : static void __exit exit_rc_map_kii_pro(void)
      75                 :            : {
      76                 :          0 :         rc_map_unregister(&kii_pro_map);
      77                 :          0 : }
      78                 :            : 
      79                 :            : module_init(init_rc_map_kii_pro)
      80                 :            : module_exit(exit_rc_map_kii_pro)
      81                 :            : 
      82                 :            : MODULE_LICENSE("GPL");
      83                 :            : MODULE_AUTHOR("Mohammad Rasim <mohammad.rasim96@gmail.com>");
    

Generated by: LCOV version 1.14