hid-steelseries.c (48a732dfaa77a4dfec803aa8f248373998704f76) | hid-steelseries.c (d881427253da011495f4193663d809d0e9dfa215) |
---|---|
1/* 2 * HID driver for Steelseries SRW-S1 3 * 4 * Copyright (c) 2013 Simon Wood 5 */ 6 7/* 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License as published by the Free 10 * Software Foundation; either version 2 of the License, or (at your option) 11 * any later version. 12 */ 13 14#include <linux/device.h> 15#include <linux/usb.h> 16#include <linux/hid.h> 17#include <linux/module.h> 18 | 1/* 2 * HID driver for Steelseries SRW-S1 3 * 4 * Copyright (c) 2013 Simon Wood 5 */ 6 7/* 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License as published by the Free 10 * Software Foundation; either version 2 of the License, or (at your option) 11 * any later version. 12 */ 13 14#include <linux/device.h> 15#include <linux/usb.h> 16#include <linux/hid.h> 17#include <linux/module.h> 18 |
19#include "usbhid/usbhid.h" | |
20#include "hid-ids.h" 21 22#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) 23#define SRWS1_NUMBER_LEDS 15 24struct steelseries_srws1_data { 25 __u16 led_state; 26 /* the last element is used for setting all leds simultaneously */ 27 struct led_classdev *led[SRWS1_NUMBER_LEDS + 1]; --- 99 unchanged lines hidden (view full) --- 127 value[9] = 0x00; 128 value[10] = 0x00; 129 value[11] = 0x00; 130 value[12] = 0x00; 131 value[13] = 0x00; 132 value[14] = 0x00; 133 value[15] = 0x00; 134 | 19#include "hid-ids.h" 20 21#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) 22#define SRWS1_NUMBER_LEDS 15 23struct steelseries_srws1_data { 24 __u16 led_state; 25 /* the last element is used for setting all leds simultaneously */ 26 struct led_classdev *led[SRWS1_NUMBER_LEDS + 1]; --- 99 unchanged lines hidden (view full) --- 126 value[9] = 0x00; 127 value[10] = 0x00; 128 value[11] = 0x00; 129 value[12] = 0x00; 130 value[13] = 0x00; 131 value[14] = 0x00; 132 value[15] = 0x00; 133 |
135 usbhid_submit_report(hdev, report, USB_DIR_OUT); | 134 hid_hw_request(hdev, report, HID_REQ_SET_REPORT); |
136 137 /* Note: LED change does not show on device until the device is read/polled */ 138} 139 140static void steelseries_srws1_led_all_set_brightness(struct led_classdev *led_cdev, 141 enum led_brightness value) 142{ 143 struct device *dev = led_cdev->dev->parent; --- 250 unchanged lines hidden --- | 135 136 /* Note: LED change does not show on device until the device is read/polled */ 137} 138 139static void steelseries_srws1_led_all_set_brightness(struct led_classdev *led_cdev, 140 enum led_brightness value) 141{ 142 struct device *dev = led_cdev->dev->parent; --- 250 unchanged lines hidden --- |