Brooklyn/drivers/input/vivaldi-fmap.c
crowetic a94b3d14aa Brooklyn+ (PLUS) changes
Changes included (and more):

1. Dynamic RAM merge

2. Real-time page scan and allocation

3. Cache compression

4. Real-time IRQ checks

5. Dynamic I/O allocation for Java heap

6. Java page migration

7. Contiguous memory allocation

8. Idle pages tracking

9. Per CPU RAM usage tracking

10. ARM NEON scalar multiplication library

11. NEON/ARMv8 crypto extensions

12. NEON SHA, Blake, RIPEMD crypto extensions

13. Parallel NEON crypto engine for multi-algo based CPU stress reduction
2022-05-12 10:47:00 -07:00

40 lines
1000 B
C

// SPDX-License-Identifier: GPL-2.0
/*
* Helpers for ChromeOS Vivaldi keyboard function row mapping
*
* Copyright (C) 2022 Google, Inc
*/
#include <linux/export.h>
#include <linux/input/vivaldi-fmap.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
/**
* vivaldi_function_row_physmap_show - Print vivaldi function row physmap attribute
* @data: The vivaldi function row map
* @buf: Buffer to print the function row phsymap to
*/
ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data,
char *buf)
{
ssize_t size = 0;
int i;
const u32 *physmap = data->function_row_physmap;
if (!data->num_function_row_keys)
return 0;
for (i = 0; i < data->num_function_row_keys; i++)
size += scnprintf(buf + size, PAGE_SIZE - size,
"%s%02X", size ? " " : "", physmap[i]);
if (size)
size += scnprintf(buf + size, PAGE_SIZE - size, "\n");
return size;
}
EXPORT_SYMBOL_GPL(vivaldi_function_row_physmap_show);
MODULE_LICENSE("GPL");