1 // SPDX-License-Identifier: GPL-2.0
3 * Helpers for ChromeOS Vivaldi keyboard function row mapping
5 * Copyright (C) 2022 Google, Inc
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>
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
19 ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data,
24 const u32 *physmap = data->function_row_physmap;
26 if (!data->num_function_row_keys)
29 for (i = 0; i < data->num_function_row_keys; i++)
30 size += scnprintf(buf + size, PAGE_SIZE - size,
31 "%s%02X", size ? " " : "", physmap[i]);
33 size += scnprintf(buf + size, PAGE_SIZE - size, "\n");
37 EXPORT_SYMBOL_GPL(vivaldi_function_row_physmap_show);
39 MODULE_LICENSE("GPL");