linux/drivers/hid/hid-xiaomi.c

// SPDX-License-Identifier: GPL-2.0
/*
 * HID driver for Xiaomi Mi Dual Mode Wireless Mouse Silent Edition
 *
 * Copyright (c) 2021 Ilya Skriblovsky
 */

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

#include "hid-ids.h"

/* Fixed Mi Silent Mouse report descriptor */
/* Button's Usage Maximum changed from 3 to 5 to make side buttons work */
#define MI_SILENT_MOUSE_ORIG_RDESC_LENGTH
static __u8 mi_silent_mouse_rdesc_fixed[] =;

static __u8 *xiaomi_report_fixup(struct hid_device *hdev, __u8 *rdesc,
				 unsigned int *rsize)
{}

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

static struct hid_driver xiaomi_driver =;
module_hid_driver();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();