LCOV - code coverage report
Current view: top level - drivers/media/rc/keymaps - rc-geekbox.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-only
       2                 :            : /*
       3                 :            :  * Keytable for the GeekBox remote controller
       4                 :            :  *
       5                 :            :  * Copyright (C) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
       6                 :            :  */
       7                 :            : 
       8                 :            : #include <media/rc-map.h>
       9                 :            : #include <linux/module.h>
      10                 :            : 
      11                 :            : static struct rc_map_table geekbox[] = {
      12                 :            :         { 0x01, KEY_BACK },
      13                 :            :         { 0x02, KEY_DOWN },
      14                 :            :         { 0x03, KEY_UP },
      15                 :            :         { 0x07, KEY_OK },
      16                 :            :         { 0x0b, KEY_VOLUMEUP },
      17                 :            :         { 0x0e, KEY_LEFT },
      18                 :            :         { 0x13, KEY_MENU },
      19                 :            :         { 0x14, KEY_POWER },
      20                 :            :         { 0x1a, KEY_RIGHT },
      21                 :            :         { 0x48, KEY_HOME },
      22                 :            :         { 0x58, KEY_VOLUMEDOWN },
      23                 :            :         { 0x5c, KEY_SCREEN },
      24                 :            : };
      25                 :            : 
      26                 :            : static struct rc_map_list geekbox_map = {
      27                 :            :         .map = {
      28                 :            :                 .scan     = geekbox,
      29                 :            :                 .size     = ARRAY_SIZE(geekbox),
      30                 :            :                 .rc_proto = RC_PROTO_NEC,
      31                 :            :                 .name     = RC_MAP_GEEKBOX,
      32                 :            :         }
      33                 :            : };
      34                 :            : 
      35                 :          3 : static int __init init_rc_map_geekbox(void)
      36                 :            : {
      37                 :          3 :         return rc_map_register(&geekbox_map);
      38                 :            : }
      39                 :            : 
      40                 :          0 : static void __exit exit_rc_map_geekbox(void)
      41                 :            : {
      42                 :          0 :         rc_map_unregister(&geekbox_map);
      43                 :          0 : }
      44                 :            : 
      45                 :            : module_init(init_rc_map_geekbox)
      46                 :            : module_exit(exit_rc_map_geekbox)
      47                 :            : 
      48                 :            : MODULE_LICENSE("GPL");
      49                 :            : MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");
    

Generated by: LCOV version 1.14