Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343088
b: refs/heads/master
c: 5277e97
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Achatz authored and Jiri Kosina committed Oct 17, 2012
1 parent e79dd49 commit e271686
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4424f616e48e0a48ac31de8d223ba1bdb46a84f1
refs/heads/master: 5277e97c2474a85eb0325ac6fff71910a4e6c134
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When written a calibration process for the tracking control unit
can be initiated/cancelled.
The data has to be 3 bytes long.
This file is writeonly.
can be initiated/cancelled. Also lets one read/write sensor
registers.
The data has to be 4 bytes long.
Users: http://roccat.sourceforge.net

What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/hid/hid-roccat-koneplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,14 @@ static ssize_t koneplus_sysfs_write_tcu(struct file *fp,
sizeof(struct koneplus_tcu), KONEPLUS_COMMAND_TCU);
}

static ssize_t koneplus_sysfs_read_tcu(struct file *fp,
struct kobject *kobj, struct bin_attribute *attr, char *buf,
loff_t off, size_t count)
{
return koneplus_sysfs_read(fp, kobj, buf, off, count,
sizeof(struct koneplus_tcu), KONEPLUS_COMMAND_TCU);
}

static ssize_t koneplus_sysfs_read_tcu_image(struct file *fp,
struct kobject *kobj, struct bin_attribute *attr, char *buf,
loff_t off, size_t count)
Expand Down Expand Up @@ -426,8 +434,9 @@ static struct bin_attribute koneplus_bin_attributes[] = {
.write = koneplus_sysfs_write_sensor
},
{
.attr = { .name = "tcu", .mode = 0220 },
.attr = { .name = "tcu", .mode = 0660 },
.size = sizeof(struct koneplus_tcu),
.read = koneplus_sysfs_read_tcu,
.write = koneplus_sysfs_write_tcu
},
{
Expand Down

0 comments on commit e271686

Please sign in to comment.