u-boot/drivers/input/apple_kbd.h
Hector Martin 2e0ee640b0 input: apple: Split off report handling into a separate file
The MTP HID driver will reuse this code, so split it off into another
file.

Signed-off-by: Hector Martin <marcan@marcan.st>
2024-04-02 20:56:02 +02:00

30 lines
598 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Common code for handling Apple laptop keyboards
*
* Copyright The Asahi Linux Contributors
*/
#ifndef _APPLE_KBD_H
#define _APPLE_KBD_H
#include <input.h>
struct apple_kbd_report {
u8 reportid;
u8 modifiers;
u8 reserved;
u8 keycode[6];
u8 fn;
};
struct apple_kbd_priv {
struct apple_kbd_report old; /* previous keyboard input report */
struct apple_kbd_report new; /* current keyboard input report */
};
int apple_kbd_handle_report(struct input_config *input,
struct apple_kbd_priv *priv,
void *data, size_t size);
#endif