hid-uclogic-params.h (f60c377f52de37f8705c5fc6d57737fdaf309ff9) hid-uclogic-params.h (a251d6576d2a29fc0806ef4775719e3b6e672d91)
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * HID driver for UC-Logic devices not fully compliant with HID standard
4 * - tablet initialization and parameter retrieval
5 *
6 * Copyright (c) 2018 Nikolai Kondrashov
7 */
8

--- 4 unchanged lines hidden (view full) ---

13 * any later version.
14 */
15
16#ifndef _HID_UCLOGIC_PARAMS_H
17#define _HID_UCLOGIC_PARAMS_H
18
19#include <linux/usb.h>
20#include <linux/hid.h>
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * HID driver for UC-Logic devices not fully compliant with HID standard
4 * - tablet initialization and parameter retrieval
5 *
6 * Copyright (c) 2018 Nikolai Kondrashov
7 */
8

--- 4 unchanged lines hidden (view full) ---

13 * any later version.
14 */
15
16#ifndef _HID_UCLOGIC_PARAMS_H
17#define _HID_UCLOGIC_PARAMS_H
18
19#include <linux/usb.h>
20#include <linux/hid.h>
21#include <linux/list.h>
21
22#define UCLOGIC_MOUSE_FRAME_QUIRK BIT(0)
23#define UCLOGIC_BATTERY_QUIRK BIT(1)
24
25/* Types of pen in-range reporting */
26enum uclogic_params_pen_inrange {
27 /* Normal reports: zero - out of proximity, one - in proximity */
28 UCLOGIC_PARAMS_PEN_INRANGE_NORMAL = 0,

--- 143 unchanged lines hidden (view full) ---

172 * Only valid if "id" is not zero. A bitmap dial sends reports with a
173 * dedicated bit per direction: 1 means clockwise rotation, 2 means
174 * counterclockwise, as opposed to the normal 1 and -1.
175 */
176 unsigned int bitmap_dial_byte;
177};
178
179/*
22
23#define UCLOGIC_MOUSE_FRAME_QUIRK BIT(0)
24#define UCLOGIC_BATTERY_QUIRK BIT(1)
25
26/* Types of pen in-range reporting */
27enum uclogic_params_pen_inrange {
28 /* Normal reports: zero - out of proximity, one - in proximity */
29 UCLOGIC_PARAMS_PEN_INRANGE_NORMAL = 0,

--- 143 unchanged lines hidden (view full) ---

173 * Only valid if "id" is not zero. A bitmap dial sends reports with a
174 * dedicated bit per direction: 1 means clockwise rotation, 2 means
175 * counterclockwise, as opposed to the normal 1 and -1.
176 */
177 unsigned int bitmap_dial_byte;
178};
179
180/*
181 * List of works to be performed when a certain raw event is received.
182 */
183struct uclogic_raw_event_hook {
184 struct hid_device *hdev;
185 __u8 *event;
186 size_t size;
187 struct work_struct work;
188 struct list_head list;
189};
190
191/*
180 * Tablet interface report parameters.
181 *
182 * Must use declarative (descriptive) language, not imperative, to simplify
183 * understanding and maintain consistency.
184 *
185 * When filled with zeros represents a "noop" configuration - passes all
186 * reports unchanged and lets the generic HID driver handle everything.
187 *

--- 23 unchanged lines hidden (view full) ---

211 * Only valid, if "invalid" is false.
212 */
213 struct uclogic_params_pen pen;
214 /*
215 * The list of frame control parameters and optional report descriptor
216 * parts. Only valid, if "invalid" is false.
217 */
218 struct uclogic_params_frame frame_list[3];
192 * Tablet interface report parameters.
193 *
194 * Must use declarative (descriptive) language, not imperative, to simplify
195 * understanding and maintain consistency.
196 *
197 * When filled with zeros represents a "noop" configuration - passes all
198 * reports unchanged and lets the generic HID driver handle everything.
199 *

--- 23 unchanged lines hidden (view full) ---

223 * Only valid, if "invalid" is false.
224 */
225 struct uclogic_params_pen pen;
226 /*
227 * The list of frame control parameters and optional report descriptor
228 * parts. Only valid, if "invalid" is false.
229 */
230 struct uclogic_params_frame frame_list[3];
231 /*
232 * List of event hooks.
233 */
234 struct uclogic_raw_event_hook *event_hooks;
219};
220
221/* Driver data */
222struct uclogic_drvdata {
223 /* Interface parameters */
224 struct uclogic_params params;
225 /* Pointer to the replacement report descriptor. NULL if none. */
226 __u8 *desc_ptr;

--- 32 unchanged lines hidden ---
235};
236
237/* Driver data */
238struct uclogic_drvdata {
239 /* Interface parameters */
240 struct uclogic_params params;
241 /* Pointer to the replacement report descriptor. NULL if none. */
242 __u8 *desc_ptr;

--- 32 unchanged lines hidden ---