LCOV - code coverage report
Current view: top level - drivers/input - vivaldi-fmap.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 9 0.0 %
Date: 2023-08-24 13:40:31 Functions: 0 1 0.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0
       2             : /*
       3             :  * Helpers for ChromeOS Vivaldi keyboard function row mapping
       4             :  *
       5             :  * Copyright (C) 2022 Google, Inc
       6             :  */
       7             : 
       8             : #include <linux/export.h>
       9             : #include <linux/input/vivaldi-fmap.h>
      10             : #include <linux/kernel.h>
      11             : #include <linux/module.h>
      12             : #include <linux/types.h>
      13             : 
      14             : /**
      15             :  * vivaldi_function_row_physmap_show - Print vivaldi function row physmap attribute
      16             :  * @data: The vivaldi function row map
      17             :  * @buf: Buffer to print the function row phsymap to
      18             :  */
      19           0 : ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data,
      20             :                                           char *buf)
      21             : {
      22           0 :         ssize_t size = 0;
      23             :         int i;
      24           0 :         const u32 *physmap = data->function_row_physmap;
      25             : 
      26           0 :         if (!data->num_function_row_keys)
      27             :                 return 0;
      28             : 
      29           0 :         for (i = 0; i < data->num_function_row_keys; i++)
      30           0 :                 size += scnprintf(buf + size, PAGE_SIZE - size,
      31           0 :                                   "%s%02X", size ? " " : "", physmap[i]);
      32           0 :         if (size)
      33           0 :                 size += scnprintf(buf + size, PAGE_SIZE - size, "\n");
      34             : 
      35             :         return size;
      36             : }
      37             : EXPORT_SYMBOL_GPL(vivaldi_function_row_physmap_show);
      38             : 
      39             : MODULE_LICENSE("GPL");

Generated by: LCOV version 1.14