.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * ISHTP-HID glue driver's definitions. |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
14 | 6 | */ |
---|
15 | 7 | #ifndef ISHTP_HID__H |
---|
16 | 8 | #define ISHTP_HID__H |
---|
.. | .. |
---|
24 | 16 | #define IS_RESPONSE 0x80 |
---|
25 | 17 | |
---|
26 | 18 | /* 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__) |
---|
30 | 22 | |
---|
31 | 23 | /* 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); |
---|
35 | 27 | |
---|
36 | 28 | /* ISH HID message structure */ |
---|
37 | 29 | struct hostif_msg_hdr { |
---|
.. | .. |
---|
118 | 110 | * @multi_packet_cnt: Count of fragmented packet count |
---|
119 | 111 | * |
---|
120 | 112 | * 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. |
---|
122 | 114 | */ |
---|
123 | 115 | struct ishtp_cl_data { |
---|
124 | 116 | /* completion flags */ |
---|
.. | .. |
---|
159 | 151 | * @client_data: Link to the client instance |
---|
160 | 152 | * @hid_wait: Completion waitq |
---|
161 | 153 | * |
---|
| 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 |
---|
162 | 157 | * Used to tie hid hid->driver data to driver client instance |
---|
163 | 158 | */ |
---|
164 | 159 | struct ishtp_hid_data { |
---|
.. | .. |
---|
166 | 161 | bool request_done; |
---|
167 | 162 | struct ishtp_cl_data *client_data; |
---|
168 | 163 | 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; |
---|
169 | 169 | }; |
---|
170 | 170 | |
---|
171 | 171 | /* Interface functions between HID LL driver and ISH TP client */ |
---|