linux/drivers/hid/hid-glorious.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  USB HID driver for Glorious PC Gaming Race
 *  Glorious Model O, O- and D mice.
 *
 *  Copyright (c) 2020 Samuel Čavoj <[email protected]>
 */

/*
 */

#include <linux/hid.h>
#include <linux/module.h>

#include "hid-ids.h"

MODULE_AUTHOR();
MODULE_DESCRIPTION();

/*
 * Glorious Model O and O- specify the const flag in the consumer input
 * report descriptor, which leads to inputs being ignored. Fix this
 * by patching the descriptor.
 *
 * Glorious Model I incorrectly specifes the Usage Minimum for its
 * keyboard HID report, causing keycodes to be misinterpreted.
 * Fix this by setting Usage Minimum to 0 in that report.
 */
static __u8 *glorious_report_fixup(struct hid_device *hdev, __u8 *rdesc,
		unsigned int *rsize)
{}

static void glorious_update_name(struct hid_device *hdev)
{}

static int glorious_probe(struct hid_device *hdev,
		const struct hid_device_id *id)
{}

static const struct hid_device_id glorious_devices[] =;
MODULE_DEVICE_TABLE(hid, glorious_devices);

static struct hid_driver glorious_driver =;

module_hid_driver();

MODULE_LICENSE();