Commit e68cc603 authored by Stefan Achatz's avatar Stefan Achatz Committed by Jiri Kosina

HID: roccat: Add support for Roccat Arvo keyboard

This patch add support for Roccat Arvo keyboard. Arvo has 5 additional
configurable buttons and the ability to deactivate certain keys.
Userland tools can soon be found at http://sourceforge.net/projects/roccatSigned-off-by: default avatarStefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent dacfecdb
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/actual_profile
Date: Januar 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The integer value of this attribute ranges from 1-5.
When read, this attribute returns the number of the actual
profile which is also the profile that's active on device startup.
When written this attribute activates the selected profile
immediately.
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/button
Date: Januar 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The keyboard can store short macros with consist of 1 button with
several modifier keys internally.
When written, this file lets one set the sequence for a specific
button for a specific profile. Button and profile numbers are
included in written data. The data has to be 24 bytes long.
This file is writeonly.
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/info
Date: Januar 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When read, this file returns some info about the device like the
installed firmware version.
The size of the data is 8 bytes in size.
This file is readonly.
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/key_mask
Date: Januar 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The keyboard lets the user deactivate 5 certain keys like the
windows and application keys, to protect the user from the outcome
of accidentally pressing them.
The integer value of this attribute has bits 0-4 set depending
on the state of the corresponding key.
When read, this file returns the current state of the buttons.
When written, the given buttons are activated/deactivated
immediately.
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/mode_key
Date: Januar 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The keyboard has a condensed layout without num-lock key.
Instead it uses a mode-key which activates a gaming mode where
the assignment of the number block changes.
The integer value of this attribute ranges from 0 (OFF) to 1 (ON).
When read, this file returns the actual state of the key.
When written, the key is activated/deactivated immediately.
\ No newline at end of file
......@@ -417,6 +417,13 @@ config HID_ROCCAT
Say Y here if you have a Roccat mouse or keyboard and want OSD or
macro execution support.
config HID_ROCCAT_ARVO
tristate "Roccat Arvo keyboard support"
depends on USB_HID
select HID_ROCCAT
---help---
Support for Roccat Arvo keyboard.
config HID_ROCCAT_KONE
tristate "Roccat Kone Mouse support"
depends on USB_HID
......
......@@ -56,6 +56,7 @@ obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o
obj-$(CONFIG_HID_ROCCAT_ARVO) += hid-roccat-arvo.o
obj-$(CONFIG_HID_ROCCAT_KONE) += hid-roccat-kone.o
obj-$(CONFIG_HID_ROCCAT_KONEPLUS) += hid-roccat-koneplus.o
obj-$(CONFIG_HID_ROCCAT_PYRA) += hid-roccat-pyra.o
......
......@@ -1405,6 +1405,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
......
......@@ -496,6 +496,7 @@
#define USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN 0x3001
#define USB_VENDOR_ID_ROCCAT 0x1e7d
#define USB_DEVICE_ID_ROCCAT_ARVO 0x30d4
#define USB_DEVICE_ID_ROCCAT_KONE 0x2ced
#define USB_DEVICE_ID_ROCCAT_KONEPLUS 0x2d51
#define USB_DEVICE_ID_ROCCAT_PYRA_WIRED 0x2c24
......
This diff is collapsed.
#ifndef __HID_ROCCAT_ARVO_H
#define __HID_ROCCAT_ARVO_H
/*
* Copyright (c) 2011 Stefan Achatz <erazor_de@users.sourceforge.net>
*/
/*
* 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.
*/
#include <linux/types.h>
struct arvo_mode_key { /* 2 bytes */
uint8_t command; /* ARVO_COMMAND_MODE_KEY */
uint8_t state;
} __packed;
struct arvo_button {
uint8_t unknown[24];
} __packed;
struct arvo_info {
uint8_t unknown[8];
} __packed;
struct arvo_key_mask { /* 2 bytes */
uint8_t command; /* ARVO_COMMAND_KEY_MASK */
uint8_t key_mask;
} __packed;
/* selected profile is persistent */
struct arvo_actual_profile { /* 2 bytes */
uint8_t command; /* ARVO_COMMAND_ACTUAL_PROFILE */
uint8_t actual_profile;
} __packed;
enum arvo_commands {
ARVO_COMMAND_MODE_KEY = 0x3,
ARVO_COMMAND_BUTTON = 0x4,
ARVO_COMMAND_INFO = 0x5,
ARVO_COMMAND_KEY_MASK = 0x6,
ARVO_COMMAND_ACTUAL_PROFILE = 0x7,
};
enum arvo_usb_commands {
ARVO_USB_COMMAND_MODE_KEY = 0x303,
/*
* read/write
* Read uses both index bytes as profile/key indexes
* Write has index 0, profile/key is determined by payload
*/
ARVO_USB_COMMAND_BUTTON = 0x304,
ARVO_USB_COMMAND_INFO = 0x305,
ARVO_USB_COMMAND_KEY_MASK = 0x306,
ARVO_USB_COMMAND_ACTUAL_PROFILE = 0x307,
};
struct arvo_special_report {
uint8_t unknown1; /* always 0x01 */
uint8_t event;
uint8_t unknown2; /* always 0x70 */
} __packed;
enum arvo_special_report_events {
ARVO_SPECIAL_REPORT_EVENT_ACTION_PRESS = 0x10,
ARVO_SPECIAL_REPORT_EVENT_ACTION_RELEASE = 0x0,
};
enum arvo_special_report_event_masks {
ARVO_SPECIAL_REPORT_EVENT_MASK_ACTION = 0xf0,
ARVO_SPECIAL_REPORT_EVENT_MASK_BUTTON = 0x0f,
};
struct arvo_roccat_report {
uint8_t profile;
uint8_t button;
uint8_t action;
} __packed;
enum arvo_roccat_report_action {
ARVO_ROCCAT_REPORT_ACTION_RELEASE = 0,
ARVO_ROCCAT_REPORT_ACTION_PRESS = 1,
};
struct arvo_device {
int roccat_claimed;
int chrdev_minor;
struct mutex arvo_lock;
int actual_profile;
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment