linux/drivers/hid/hid-roccat-pyra.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Roccat Pyra driver for Linux
 *
 * Copyright (c) 2010 Stefan Achatz <[email protected]>
 */

/*
 */

/*
 * Roccat Pyra is a mobile gamer mouse which comes in wired and wireless
 * variant. Wireless variant is not tested.
 * Userland tools can be found at http://sourceforge.net/projects/roccat
 */

#include <linux/device.h>
#include <linux/input.h>
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/hid-roccat.h>
#include "hid-ids.h"
#include "hid-roccat-common.h"
#include "hid-roccat-pyra.h"

static uint profile_numbers[5] =;

static void profile_activated(struct pyra_device *pyra,
		unsigned int new_profile)
{}

static int pyra_send_control(struct usb_device *usb_dev, int value,
		enum pyra_control_requests request)
{}

static int pyra_get_profile_settings(struct usb_device *usb_dev,
		struct pyra_profile_settings *buf, int number)
{}

static int pyra_get_settings(struct usb_device *usb_dev,
		struct pyra_settings *buf)
{}

static int pyra_set_settings(struct usb_device *usb_dev,
		struct pyra_settings const *settings)
{}

static ssize_t pyra_sysfs_read(struct file *fp, struct kobject *kobj,
		char *buf, loff_t off, size_t count,
		size_t real_size, uint command)
{}

static ssize_t pyra_sysfs_write(struct file *fp, struct kobject *kobj,
		void const *buf, loff_t off, size_t count,
		size_t real_size, uint command)
{}

#define PYRA_SYSFS_W(thingy, THINGY)

#define PYRA_SYSFS_R(thingy, THINGY)

#define PYRA_SYSFS_RW(thingy, THINGY)

#define PYRA_BIN_ATTRIBUTE_RW(thingy, THINGY)

#define PYRA_BIN_ATTRIBUTE_R(thingy, THINGY)

#define PYRA_BIN_ATTRIBUTE_W(thingy, THINGY)

PYRA_BIN_ATTRIBUTE_W();
PYRA_BIN_ATTRIBUTE_RW();
PYRA_BIN_ATTRIBUTE_RW();
PYRA_BIN_ATTRIBUTE_RW();

static ssize_t pyra_sysfs_read_profilex_settings(struct file *fp,
		struct kobject *kobj, struct bin_attribute *attr, char *buf,
		loff_t off, size_t count)
{}

static ssize_t pyra_sysfs_read_profilex_buttons(struct file *fp,
		struct kobject *kobj, struct bin_attribute *attr, char *buf,
		loff_t off, size_t count)
{}

#define PROFILE_ATTR(number)
PROFILE_ATTR(1);
PROFILE_ATTR(2);
PROFILE_ATTR(3);
PROFILE_ATTR(4);
PROFILE_ATTR(5);

static ssize_t pyra_sysfs_write_settings(struct file *fp,
		struct kobject *kobj, struct bin_attribute *attr, char *buf,
		loff_t off, size_t count)
{}

PYRA_SYSFS_R(settings, SETTINGS);
static struct bin_attribute bin_attr_settings =;

static ssize_t pyra_sysfs_show_actual_cpi(struct device *dev,
		struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR(actual_cpi, 0440, pyra_sysfs_show_actual_cpi, NULL);

static ssize_t pyra_sysfs_show_actual_profile(struct device *dev,
		struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR(actual_profile, 0440, pyra_sysfs_show_actual_profile, NULL);
static DEVICE_ATTR(startup_profile, 0440, pyra_sysfs_show_actual_profile, NULL);

static ssize_t pyra_sysfs_show_firmware_version(struct device *dev,
		struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR(firmware_version, 0440, pyra_sysfs_show_firmware_version,
		   NULL);

static struct attribute *pyra_attrs[] =;

static struct bin_attribute *pyra_bin_attributes[] =;

static const struct attribute_group pyra_group =;

static const struct attribute_group *pyra_groups[] =;

/* pyra_class is used for creating sysfs attributes via roccat char device */
static const struct class pyra_class =;

static int pyra_init_pyra_device_struct(struct usb_device *usb_dev,
		struct pyra_device *pyra)
{}

static int pyra_init_specials(struct hid_device *hdev)
{}

static void pyra_remove_specials(struct hid_device *hdev)
{}

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

static void pyra_remove(struct hid_device *hdev)
{}

static void pyra_keep_values_up_to_date(struct pyra_device *pyra,
		u8 const *data)
{}

static void pyra_report_to_chrdev(struct pyra_device const *pyra,
		u8 const *data)
{}

static int pyra_raw_event(struct hid_device *hdev, struct hid_report *report,
		u8 *data, int size)
{}

static const struct hid_device_id pyra_devices[] =;

MODULE_DEVICE_TABLE(hid, pyra_devices);

static struct hid_driver pyra_driver =;

static int __init pyra_init(void)
{}

static void __exit pyra_exit(void)
{}

module_init();
module_exit(pyra_exit);

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