Source
MODULE_PARM_DESC(recordkey_codes, "Key codes for the MR (start and stop record) button");
/*
* HID driver for Corsair devices
*
* Supported devices:
* - Vengeance K70 Keyboard
* - K70 RAPIDFIRE Keyboard
* - Vengeance K90 Keyboard
* - Scimitar PRO RGB Gaming Mouse
*
* Copyright (c) 2015 Clement Vuchener
* Copyright (c) 2017 Oscar Campos
* Copyright (c) 2017 Aaron Bottegal
*/
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*/
struct k90_led {
struct led_classdev cdev;
int brightness;
struct work_struct work;
bool removed;
};
struct k90_drvdata {
struct k90_led record_led;
};
struct corsair_drvdata {
unsigned long quirks;
struct k90_drvdata *k90;
struct k90_led *backlight;
};
static int corsair_usage_to_gkey(unsigned int usage)
{
/* G1 (0xd0) to G16 (0xdf) */
if (usage >= 0xd0 && usage <= 0xdf)
return usage - 0xd0 + 1;
/* G17 (0xe8) to G18 (0xe9) */
if (usage >= 0xe8 && usage <= 0xe9)
return usage - 0xe8 + 17;
return 0;
}
static unsigned short corsair_gkey_map[K90_GKEY_COUNT] = {
BTN_TRIGGER_HAPPY1,