linux/drivers/hid/hid-winwing.c

// SPDX-License-Identifier: GPL-2.0

/*
 * HID driver for WinWing Orion 2 throttle
 *
 * Copyright (c) 2023 Ivan Gorinov
 */

#include <linux/device.h>
#include <linux/hid.h>
#include <linux/hidraw.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>

#define MAX_REPORT

struct winwing_led {};

struct winwing_led_info {};

static struct winwing_led_info led_info[3] =;

struct winwing_drv_data {};

static int winwing_led_write(struct led_classdev *cdev,
		enum led_brightness br)
{}

static int winwing_init_led(struct hid_device *hdev,
		struct input_dev *input)
{}

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

static int winwing_input_configured(struct hid_device *hdev,
		struct hid_input *hidinput)
{}

static __u8 original_rdesc_buttons[] =;

/*
 * HID report descriptor shows 111 buttons, which exceeds maximum
 * number of buttons (80) supported by Linux kernel HID subsystem.
 *
 * This module skips numbers 32-63, unused on some throttle grips.
 */

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

static int winwing_raw_event(struct hid_device *hdev,
		struct hid_report *report, u8 *raw_data, int size)
{}

static const struct hid_device_id winwing_devices[] =;

MODULE_DEVICE_TABLE(hid, winwing_devices);

static struct hid_driver winwing_driver =;
module_hid_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();