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
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)
.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
},
{