linux/drivers/hid/hid-uclogic-rdesc.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *  HID driver for UC-Logic devices not fully compliant with HID standard
 *  - original and fixed report descriptors
 *
 *  Copyright (c) 2010-2017 Nikolai Kondrashov
 *  Copyright (c) 2013 Martin Rusko
 */

/*
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 */

#include "hid-uclogic-rdesc.h"
#include <linux/slab.h>
#include <asm/unaligned.h>
#include <kunit/visibility.h>

/* Fixed WP4030U report descriptor */
__u8 uclogic_rdesc_wp4030u_fixed_arr[] =;

const size_t uclogic_rdesc_wp4030u_fixed_size =;

/* Fixed WP5540U report descriptor */
__u8 uclogic_rdesc_wp5540u_fixed_arr[] =;

const size_t uclogic_rdesc_wp5540u_fixed_size =;

/* Fixed WP8060U report descriptor */
__u8 uclogic_rdesc_wp8060u_fixed_arr[] =;

const size_t uclogic_rdesc_wp8060u_fixed_size =;

/* Fixed WP1062 report descriptor */
__u8 uclogic_rdesc_wp1062_fixed_arr[] =;

const size_t uclogic_rdesc_wp1062_fixed_size =;

/* Fixed PF1209 report descriptor */
__u8 uclogic_rdesc_pf1209_fixed_arr[] =;

const size_t uclogic_rdesc_pf1209_fixed_size =;

/* Fixed PID 0522 tablet report descriptor, interface 0 (stylus) */
__u8 uclogic_rdesc_twhl850_fixed0_arr[] =;

const size_t uclogic_rdesc_twhl850_fixed0_size =;

/* Fixed PID 0522 tablet report descriptor, interface 1 (mouse) */
__u8 uclogic_rdesc_twhl850_fixed1_arr[] =;

const size_t uclogic_rdesc_twhl850_fixed1_size =;

/* Fixed PID 0522 tablet report descriptor, interface 2 (frame buttons) */
__u8 uclogic_rdesc_twhl850_fixed2_arr[] =;

const size_t uclogic_rdesc_twhl850_fixed2_size =;

/* Fixed TWHA60 report descriptor, interface 0 (stylus) */
__u8 uclogic_rdesc_twha60_fixed0_arr[] =;

const size_t uclogic_rdesc_twha60_fixed0_size =;

/* Fixed TWHA60 report descriptor, interface 1 (frame buttons) */
__u8 uclogic_rdesc_twha60_fixed1_arr[] =;

const size_t uclogic_rdesc_twha60_fixed1_size =;

/* Fixed report descriptor template for (tweaked) v1 pen reports */
const __u8 uclogic_rdesc_v1_pen_template_arr[] =;

const size_t uclogic_rdesc_v1_pen_template_size =;

/* Fixed report descriptor template for (tweaked) v2 pen reports */
const __u8 uclogic_rdesc_v2_pen_template_arr[] =;

const size_t uclogic_rdesc_v2_pen_template_size =;

/*
 * Expand to the contents of a generic frame buttons report descriptor.
 *
 * @_id:	The report ID to use.
 * @_size:	Size of the report to pad to, including report ID, bytes.
 */
#define UCLOGIC_RDESC_FRAME_BUTTONS_BYTES(_id, _size)

/* Fixed report descriptor for (tweaked) v1 frame reports */
const __u8 uclogic_rdesc_v1_frame_arr[] =;
const size_t uclogic_rdesc_v1_frame_size =;

/* Fixed report descriptor for (tweaked) v2 frame button reports */
const __u8 uclogic_rdesc_v2_frame_buttons_arr[] =;
const size_t uclogic_rdesc_v2_frame_buttons_size =;

/* Fixed report descriptor for (tweaked) v2 frame touch ring reports */
const __u8 uclogic_rdesc_v2_frame_touch_ring_arr[] =;
const size_t uclogic_rdesc_v2_frame_touch_ring_size =;

/* Fixed report descriptor for (tweaked) v2 frame touch strip reports */
const __u8 uclogic_rdesc_v2_frame_touch_strip_arr[] =;
const size_t uclogic_rdesc_v2_frame_touch_strip_size =;

/* Fixed report descriptor for (tweaked) v2 frame dial reports */
const __u8 uclogic_rdesc_v2_frame_dial_arr[] =;
const size_t uclogic_rdesc_v2_frame_dial_size =;

const __u8 uclogic_ugee_v2_probe_arr[] =;
const size_t uclogic_ugee_v2_probe_size =;
const int uclogic_ugee_v2_probe_endpoint =;

/* Fixed report descriptor template for UGEE v2 pen reports */
const __u8 uclogic_rdesc_ugee_v2_pen_template_arr[] =;
const size_t uclogic_rdesc_ugee_v2_pen_template_size =;

/* Fixed report descriptor template for UGEE v2 frame reports (buttons only) */
const __u8 uclogic_rdesc_ugee_v2_frame_btn_template_arr[] =;
const size_t uclogic_rdesc_ugee_v2_frame_btn_template_size =;

/* Fixed report descriptor template for UGEE v2 frame reports (dial) */
const __u8 uclogic_rdesc_ugee_v2_frame_dial_template_arr[] =;
const size_t uclogic_rdesc_ugee_v2_frame_dial_template_size =;

/* Fixed report descriptor template for UGEE v2 frame reports (mouse) */
const __u8 uclogic_rdesc_ugee_v2_frame_mouse_template_arr[] =;
const size_t uclogic_rdesc_ugee_v2_frame_mouse_template_size =;

/* Fixed report descriptor template for UGEE v2 battery reports */
const __u8 uclogic_rdesc_ugee_v2_battery_template_arr[] =;
const size_t uclogic_rdesc_ugee_v2_battery_template_size =;

/* Fixed report descriptor for Ugee EX07 frame */
const __u8 uclogic_rdesc_ugee_ex07_frame_arr[] =;
const size_t uclogic_rdesc_ugee_ex07_frame_size =;

/* Fixed report descriptor for Ugee G5 frame controls */
const __u8 uclogic_rdesc_ugee_g5_frame_arr[] =;
const size_t uclogic_rdesc_ugee_g5_frame_size =;

/* Fixed report descriptor for XP-Pen Deco 01 frame controls */
const __u8 uclogic_rdesc_xppen_deco01_frame_arr[] =;

const size_t uclogic_rdesc_xppen_deco01_frame_size =;

/**
 * uclogic_rdesc_template_apply() - apply report descriptor parameters to a
 * report descriptor template, creating a report descriptor. Copies the
 * template over to the new report descriptor and replaces every occurrence of
 * the template placeholders, followed by an index byte, with the value from the
 * parameter list at that index.
 *
 * @template_ptr:	Pointer to the template buffer.
 * @template_size:	Size of the template buffer.
 * @param_list:		List of template parameters.
 * @param_num:		Number of parameters in the list.
 *
 * Returns:
 *	Kmalloc-allocated pointer to the created report descriptor,
 *	or NULL if allocation failed.
 */
__u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr,
				   size_t template_size,
				   const s32 *param_list,
				   size_t param_num)
{}
EXPORT_SYMBOL_IF_KUNIT();