drivers/hid/hid-uclogic-params.h

Source file repositories/reference/linux-study-clean/drivers/hid/hid-uclogic-params.h

File Facts

System
Linux kernel
Corpus path
drivers/hid/hid-uclogic-params.h
Extension
.h
Size
8807 bytes
Lines
285
Domain
Driver Families
Bucket
drivers/hid
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct uclogic_params_pen_subreport {
	/*
	 * The value of the second byte of the pen report indicating this
	 * subreport. If zero, the subreport should be considered invalid and
	 * not matched.
	 */
	__u8 value;

	/*
	 * The ID to be assigned to the report, if the second byte of the pen
	 * report is equal to "value". Only valid if "value" is not zero.
	 */
	__u8 id;
};

/*
 * Tablet interface's pen input parameters.
 *
 * Must use declarative (descriptive) language, not imperative, to simplify
 * understanding and maintain consistency.
 *
 * Noop (preserving functionality) when filled with zeroes.
 */
struct uclogic_params_pen {
	/*
	 * True if pen usage is invalid for this interface and should be
	 * ignored, false otherwise.
	 */
	bool usage_invalid;
	/*
	 * Pointer to report descriptor part describing the pen inputs.
	 * Allocated with kmalloc. NULL if the part is not specified.
	 */
	const __u8 *desc_ptr;
	/*
	 * Size of the report descriptor.
	 * Only valid, if "desc_ptr" is not NULL.
	 */
	unsigned int desc_size;
	/* Report ID, if reports should be tweaked, zero if not */
	unsigned int id;
	/* The list of subreports, only valid if "id" is not zero */
	struct uclogic_params_pen_subreport subreport_list[3];
	/* Type of in-range reporting, only valid if "id" is not zero */
	enum uclogic_params_pen_inrange inrange;
	/*
	 * True, if reports include fragmented high resolution coords, with
	 * high-order X and then Y bytes following the pressure field.
	 * Only valid if "id" is not zero.
	 */
	bool fragmented_hires;
	/*
	 * True if the pen reports tilt in bytes at offset 10 (X) and 11 (Y),
	 * and the Y tilt direction is flipped.
	 * Only valid if "id" is not zero.
	 */
	bool tilt_y_flipped;
	/*
	 * True, if reports include fragmented high resolution X coords.
	 * This moves bytes 10-11 to the LSB of the X coordinate.
	 */
	bool fragmented_hires2;
};

/*
 * Parameters of frame control inputs of a tablet interface.
 *
 * Must use declarative (descriptive) language, not imperative, to simplify
 * understanding and maintain consistency.
 *
 * Noop (preserving functionality) when filled with zeroes.
 */
struct uclogic_params_frame {
	/*
	 * Pointer to report descriptor part describing the frame inputs.
	 * Allocated with kmalloc. NULL if the part is not specified.
	 */
	const __u8 *desc_ptr;
	/*
	 * Size of the report descriptor.
	 * Only valid, if "desc_ptr" is not NULL.
	 */
	unsigned int desc_size;
	/*
	 * Report ID, if reports should be tweaked, zero if not.
	 */
	unsigned int id;
	/*
	 * The suffix to add to the input device name, if not NULL.
	 */

Annotation

Implementation Notes