linux/drivers/hid/hid-lg-g15.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *  HID driver for gaming keys on Logitech gaming keyboards (such as the G15)
 *
 *  Copyright (c) 2019 Hans de Goede <[email protected]>
 */

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

#include "hid-ids.h"

#define LG_G15_TRANSFER_BUF_SIZE

#define LG_G15_FEATURE_REPORT

#define LG_G510_FEATURE_M_KEYS_LEDS
#define LG_G510_FEATURE_BACKLIGHT_RGB
#define LG_G510_FEATURE_POWER_ON_RGB

enum lg_g15_model {};

enum lg_g15_led_type {};

struct lg_g15_led {};

struct lg_g15_data {};

/******** G15 and G15 v2 LED functions ********/

static int lg_g15_update_led_brightness(struct lg_g15_data *g15)
{}

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

static int lg_g15_led_set(struct led_classdev *led_cdev,
			  enum led_brightness brightness)
{}

static void lg_g15_leds_changed_work(struct work_struct *work)
{}

/******** G510 LED functions ********/

static int lg_g510_get_initial_led_brightness(struct lg_g15_data *g15, int i)
{}

/* Must be called with g15->mutex locked */
static int lg_g510_kbd_led_write(struct lg_g15_data *g15,
				 struct lg_g15_led *g15_led,
				 enum led_brightness brightness)
{}

static int lg_g510_kbd_led_set(struct led_classdev *led_cdev,
			       enum led_brightness brightness)
{}

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

static ssize_t color_store(struct device *dev, struct device_attribute *attr,
			   const char *buf, size_t count)
{}

static ssize_t color_show(struct device *dev, struct device_attribute *attr,
			  char *buf)
{}

static DEVICE_ATTR_RW(color);

static struct attribute *lg_g510_kbd_led_attrs[] =;

static const struct attribute_group lg_g510_kbd_led_group =;

static const struct attribute_group *lg_g510_kbd_led_groups[] =;

static void lg_g510_leds_sync_work(struct work_struct *work)
{}

static int lg_g510_update_mkey_led_brightness(struct lg_g15_data *g15)
{}

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

static int lg_g510_mkey_led_set(struct led_classdev *led_cdev,
				enum led_brightness brightness)
{}

/******** Generic LED functions ********/
static int lg_g15_get_initial_led_brightness(struct lg_g15_data *g15)
{}

/******** Input functions ********/

/* On the G15 Mark I Logitech has been quite creative with which bit is what */
static void lg_g15_handle_lcd_menu_keys(struct lg_g15_data *g15, u8 *data)
{}

static int lg_g15_event(struct lg_g15_data *g15, u8 *data)
{}

static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data)
{}

static int lg_g510_event(struct lg_g15_data *g15, u8 *data)
{}

static int lg_g510_leds_event(struct lg_g15_data *g15, u8 *data)
{}

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

static int lg_g15_input_open(struct input_dev *dev)
{}

static void lg_g15_input_close(struct input_dev *dev)
{}

static int lg_g15_register_led(struct lg_g15_data *g15, int i, const char *name)
{}

/* Common input device init code shared between keyboards and Z-10 speaker handling */
static void lg_g15_init_input_dev(struct hid_device *hdev, struct input_dev *input,
				  const char *name)
{}

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

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

static struct hid_driver lg_g15_driver =;
module_hid_driver();

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