hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/hid/intel-ish-hid/ishtp-hid.h
....@@ -1,16 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * ISHTP-HID glue driver's definitions.
34 *
45 * Copyright (c) 2014-2016, Intel Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
146 */
157 #ifndef ISHTP_HID__H
168 #define ISHTP_HID__H
....@@ -24,14 +16,14 @@
2416 #define IS_RESPONSE 0x80
2517
2618 /* Used to dump to Linux trace buffer, if enabled */
27
-#define hid_ishtp_trace(client, ...) \
28
- client->cl_device->ishtp_dev->print_log(\
29
- client->cl_device->ishtp_dev, __VA_ARGS__)
19
+extern void (*hid_print_trace)(void *unused, const char *format, ...);
20
+#define hid_ishtp_trace(client, ...) \
21
+ (hid_print_trace)(NULL, __VA_ARGS__)
3022
3123 /* ISH Transport protocol (ISHTP in short) GUID */
32
-static const uuid_le hid_ishtp_guid = UUID_LE(0x33AECD58, 0xB679, 0x4E54,
33
- 0x9B, 0xD9, 0xA0, 0x4D, 0x34,
34
- 0xF0, 0xC2, 0x26);
24
+static const guid_t hid_ishtp_guid =
25
+ GUID_INIT(0x33AECD58, 0xB679, 0x4E54,
26
+ 0x9B, 0xD9, 0xA0, 0x4D, 0x34, 0xF0, 0xC2, 0x26);
3527
3628 /* ISH HID message structure */
3729 struct hostif_msg_hdr {
....@@ -118,7 +110,7 @@
118110 * @multi_packet_cnt: Count of fragmented packet count
119111 *
120112 * This structure is used to store completion flags and per client data like
121
- * like report description, number of HID devices etc.
113
+ * report description, number of HID devices etc.
122114 */
123115 struct ishtp_cl_data {
124116 /* completion flags */
....@@ -159,6 +151,9 @@
159151 * @client_data: Link to the client instance
160152 * @hid_wait: Completion waitq
161153 *
154
+ * @raw_get_req: Flag indicating raw get request ongoing
155
+ * @raw_buf: raw request buffer filled on receiving get report
156
+ * @raw_buf_size: raw request buffer size
162157 * Used to tie hid hid->driver data to driver client instance
163158 */
164159 struct ishtp_hid_data {
....@@ -166,6 +161,11 @@
166161 bool request_done;
167162 struct ishtp_cl_data *client_data;
168163 wait_queue_head_t hid_wait;
164
+
165
+ /* raw request */
166
+ bool raw_get_req;
167
+ u8 *raw_buf;
168
+ size_t raw_buf_size;
169169 };
170170
171171 /* Interface functions between HID LL driver and ISH TP client */