LCOV - code coverage report
Current view: top level - drivers/media/rc/keymaps - rc-hisi-poplar.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                 :            :  * Keytable for remote controller of HiSilicon poplar board.
       4                 :            :  *
       5                 :            :  * Copyright (c) 2017 HiSilicon Technologies Co., Ltd.
       6                 :            :  */
       7                 :            : 
       8                 :            : #include <linux/module.h>
       9                 :            : #include <media/rc-map.h>
      10                 :            : 
      11                 :            : static struct rc_map_table hisi_poplar_keymap[] = {
      12                 :            :         { 0x0000b292, KEY_NUMERIC_1},
      13                 :            :         { 0x0000b293, KEY_NUMERIC_2},
      14                 :            :         { 0x0000b2cc, KEY_NUMERIC_3},
      15                 :            :         { 0x0000b28e, KEY_NUMERIC_4},
      16                 :            :         { 0x0000b28f, KEY_NUMERIC_5},
      17                 :            :         { 0x0000b2c8, KEY_NUMERIC_6},
      18                 :            :         { 0x0000b28a, KEY_NUMERIC_7},
      19                 :            :         { 0x0000b28b, KEY_NUMERIC_8},
      20                 :            :         { 0x0000b2c4, KEY_NUMERIC_9},
      21                 :            :         { 0x0000b287, KEY_NUMERIC_0},
      22                 :            :         { 0x0000b282, KEY_HOMEPAGE},
      23                 :            :         { 0x0000b2ca, KEY_UP},
      24                 :            :         { 0x0000b299, KEY_LEFT},
      25                 :            :         { 0x0000b2c1, KEY_RIGHT},
      26                 :            :         { 0x0000b2d2, KEY_DOWN},
      27                 :            :         { 0x0000b2c5, KEY_DELETE},
      28                 :            :         { 0x0000b29c, KEY_MUTE},
      29                 :            :         { 0x0000b281, KEY_VOLUMEDOWN},
      30                 :            :         { 0x0000b280, KEY_VOLUMEUP},
      31                 :            :         { 0x0000b2dc, KEY_POWER},
      32                 :            :         { 0x0000b29a, KEY_MENU},
      33                 :            :         { 0x0000b28d, KEY_SETUP},
      34                 :            :         { 0x0000b2c5, KEY_BACK},
      35                 :            :         { 0x0000b295, KEY_PLAYPAUSE},
      36                 :            :         { 0x0000b2ce, KEY_ENTER},
      37                 :            :         { 0x0000b285, KEY_CHANNELUP},
      38                 :            :         { 0x0000b286, KEY_CHANNELDOWN},
      39                 :            :         { 0x0000b2da, KEY_NUMERIC_STAR},
      40                 :            :         { 0x0000b2d0, KEY_NUMERIC_POUND},
      41                 :            : };
      42                 :            : 
      43                 :            : static struct rc_map_list hisi_poplar_map = {
      44                 :            :         .map = {
      45                 :            :                 .scan     = hisi_poplar_keymap,
      46                 :            :                 .size     = ARRAY_SIZE(hisi_poplar_keymap),
      47                 :            :                 .rc_proto = RC_PROTO_NEC,
      48                 :            :                 .name     = RC_MAP_HISI_POPLAR,
      49                 :            :         }
      50                 :            : };
      51                 :            : 
      52                 :          3 : static int __init init_rc_map_hisi_poplar(void)
      53                 :            : {
      54                 :          3 :         return rc_map_register(&hisi_poplar_map);
      55                 :            : }
      56                 :            : 
      57                 :          0 : static void __exit exit_rc_map_hisi_poplar(void)
      58                 :            : {
      59                 :          0 :         rc_map_unregister(&hisi_poplar_map);
      60                 :          0 : }
      61                 :            : 
      62                 :            : module_init(init_rc_map_hisi_poplar)
      63                 :            : module_exit(exit_rc_map_hisi_poplar)
      64                 :            : 
      65                 :            : MODULE_LICENSE("GPL v2");
    

Generated by: LCOV version 1.14