linux/drivers/hid/hid-steelseries.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  HID driver for Steelseries devices
 *
 *  Copyright (c) 2013 Simon Wood
 *  Copyright (c) 2023 Bastien Nocera
 */

/*
 */

#include <linux/device.h>
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/leds.h>

#include "hid-ids.h"

#define STEELSERIES_SRWS1
#define STEELSERIES_ARCTIS_1

struct steelseries_device {};

#if IS_BUILTIN(CONFIG_LEDS_CLASS) || \
    (IS_MODULE(CONFIG_LEDS_CLASS) && IS_MODULE(CONFIG_HID_STEELSERIES))
#define SRWS1_NUMBER_LEDS
struct steelseries_srws1_data {};
#endif

/* Fixed report descriptor for Steelseries SRW-S1 wheel controller
 *
 * The original descriptor hides the sensitivity and assists dials
 * a custom vendor usage page. This inserts a patch to make them
 * appear in the 'Generic Desktop' usage.
 */

static __u8 steelseries_srws1_rdesc_fixed[] =;

#if IS_BUILTIN(CONFIG_LEDS_CLASS) || \
    (IS_MODULE(CONFIG_LEDS_CLASS) && IS_MODULE(CONFIG_HID_STEELSERIES))
static void steelseries_srws1_set_leds(struct hid_device *hdev, __u16 leds)
{}

static void steelseries_srws1_led_all_set_brightness(struct led_classdev *led_cdev,
			enum led_brightness value)
{}

static enum led_brightness steelseries_srws1_led_all_get_brightness(struct led_classdev *led_cdev)
{}

static void steelseries_srws1_led_set_brightness(struct led_classdev *led_cdev,
			enum led_brightness value)
{}

static enum led_brightness steelseries_srws1_led_get_brightness(struct led_classdev *led_cdev)
{}

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

static void steelseries_srws1_remove(struct hid_device *hdev)
{}
#endif

#define STEELSERIES_HEADSET_BATTERY_TIMEOUT_MS

#define ARCTIS_1_BATTERY_RESPONSE_LEN
static const char arctis_1_battery_request[] =;

static int steelseries_headset_arctis_1_fetch_battery(struct hid_device *hdev)
{}

static void steelseries_headset_fetch_battery(struct hid_device *hdev)
{}

static void steelseries_headset_battery_timer_tick(struct work_struct *work)
{}

static int steelseries_headset_battery_get_property(struct power_supply *psy,
				enum power_supply_property psp,
				union power_supply_propval *val)
{}

static void
steelseries_headset_set_wireless_status(struct hid_device *hdev,
					bool connected)
{}

static enum power_supply_property steelseries_headset_battery_props[] =;

static int steelseries_headset_battery_register(struct steelseries_device *sd)
{}

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

static void steelseries_remove(struct hid_device *hdev)
{}

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

static int steelseries_headset_raw_event(struct hid_device *hdev,
					struct hid_report *report, u8 *read_buf,
					int size)
{}

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

static struct hid_driver steelseries_driver =;

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