summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-koneplus.c
Commit message (Collapse)AuthorAgeFilesLines
* HID: roccat: Fix "cannot create duplicate filename" problemsStefan Achatz2013-09-301-2/+2
| | | | | | | | Fixing some wrong macro stringification/concatenation. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2013-09-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: "Highlights: - conversion of HID subsystem to use devm-based resource management, from Benjamin Tissoires - i2c-hid support for DT bindings, from Benjamin Tissoires - much improved support for Win8-multitouch devices, from Benjamin Tissoires - cleanup of core code using common hidinput_input_event(), from David Herrmann - fix for bug in implement() access to the bit stream (causing oops) that has been present in the code for ages, but devices that are able to trigger it have started to appear only now, from Jiri Kosina - fixes for CVE-2013-2899, CVE-2013-2898, CVE-2013-2896, CVE-2013-2892, CVE-2013-2888 (all triggerable only by specially crafted malicious HW devices plugged into the system), from Kees Cook - hidraw oops fix, from Manoj Chourasia - various smaller fixes here and there, support for a bunch of new devices by various contributors" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (53 commits) HID: MAINTAINERS: add roccat drivers HID: hid-sensor-hub: change kmalloc + memcpy by kmemdup HID: hid-sensor-hub: move to devm_kzalloc HID: hid-sensor-hub: fix indentation accross the code HID: move HID_REPORT_TYPES closer to the report-definitions HID: check for NULL field when setting values HID: picolcd_core: validate output report details HID: sensor-hub: validate feature report details HID: ntrig: validate feature report details HID: pantherlord: validate output report details HID: hid-wiimote: print small buffers via %*phC HID: uhid: improve uhid example client HID: Correct the USB IDs for the new Macbook Air 6 HID: wiimote: add support for Guitar-Hero guitars HID: wiimote: add support for Guitar-Hero drums Input: introduce BTN/ABS bits for drums and guitars HID: battery: don't do DMA from stack HID: roccat: add support for KonePureOptical v2 HID: picolcd: Prevent NULL pointer dereference on _remove() HID: usbhid: quirk for N-Trig DuoSense Touch Screen ...
| * HID: replace strict_strtoul() with kstrtoul()Jingoo Han2013-07-231-1/+1
| | | | | | | | | | | | | | | | | | The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | hid: roccat-koneplus: convert class code to use bin_attrs in groupsGreg Kroah-Hartman2013-08-191-87/+66
| | | | | | | | | | | | | | | | Now that attribute groups support binary attributes, use them instead of the dev_bin_attrs field in struct class, as that is going away soon. Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | HID: roccat: convert class code to use dev_groupsGreg Kroah-Hartman2013-08-191-12/+16
|/ | | | | | | | | The dev_attrs field of struct class is going away soon, dev_groups should be used instead. This converts the roccat class code to use the correct field. Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* HID: roccat: deprecate some Koneplus attributesStefan Achatz2012-11-121-4/+6
| | | | | | | | Introduced attribute "control" and made profile_settings and profile_buttons readable, which makes profile[1-5]_settings and profile[1-5]_buttons obsolete. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Cleanup of koneplus moduleStefan Achatz2012-11-051-282/+89
| | | | | | | | | | Removed caching of profile data which lowers memory footprint, speeds up init and fixes problems with device reset. Removed unnecessary infos in header. Code moved nearer to format of newer drivers. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: enable Koneplus device resetStefan Achatz2012-11-051-0/+22
| | | | | | | | | Device can be reset to factory state by sending a command via info sysfs attr. Added binary attribute info for this purpose, which obsoletes firmware_version attribute. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: add support for KoneXTDStefan Achatz2012-11-051-1/+3
| | | | | | | | KoneXTD is just a Kone[+] with updated sensor, so it's handled by koneplus driver. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: allow readout of koneplus sensor register dataStefan Achatz2012-10-171-1/+10
| | | | | | | | | tcu sysfs attr was used to only control calibration process so far. Direct sensor register access possibility has been revealed. Allowing readout of tcu permits usage of this feature. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: rename roccat_common functions to roccat_common2Stefan Achatz2012-06-281-12/+12
| | | | | | | | | | Did this to illustrate my understanding of the firmware generations: Valo and Kone were 1st generation Arvo was externaly developed and lies in the middle All others until now are considered 2nd generation Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: move functionality to roccat-commonStefan Achatz2012-06-281-73/+15
| | | | | | | | Reduced code duplication by moving functions from individual drivers to roccat-common module. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: fix NULL pointer dereference, add range checksStefan Achatz2011-06-131-1/+7
| | | | | | | | | | | On rare occassions raw events can be triggered before drvdata gets set up which leads to NULL pointer dereferences. This was only observed with pyra on 2.6.39, but is fixed for all devices now to play it save. kovaplus returned wrong actual values when profile change was initiated from host. Added range checks for setting actual profile on all devices. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: correction and cleanup of HID feature reportsStefan Achatz2011-06-131-15/+15
| | | | | | | | | Removed analog feature report enums and modified code in roccat_common to reflect this. Non standard conform Kone got its own copy of the old code. That helps extracting more generalizations for newer devices. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Add "Roccat Talk" support for koneplusStefan Achatz2011-06-131-0/+13
| | | | | | | | Added binary sysfs attribute to support new functionality the manufacturer added to koneplus. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: fix actual/startup profile sysfs attribute in koneplusStefan Achatz2011-05-181-38/+44
| | | | | | | | | | | startup_profile and actual_profile didn't work as expected. Also as the actual profile is persistent, the distinction between the two was ambiguous, so both use the same code now and startup_profile has been deprecated. Also the event is now propagated through chardev. The userland tool has been updated to support this change. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat-koneplus: vorrect mode of sysfs attr 'sensor'Stefan Achatz2011-03-151-1/+1
| | | | | | | | Mode of sysfs attribute 'sensor' was wrongly set to writeonly. Corrected this to readwrite. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Rename header roccat.h -> hid-roccat.hStefan Achatz2011-02-031-1/+1
| | | | | | | It was desired that the header roccat.h should be named hid-roccat.h Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Fix NULL pointer dereference when unloading moduleStefan Achatz2011-02-031-1/+1
| | | | | | | | | | Class was destroyed before starting the unregistering driver chain. Disconnecting a device from roccat chardev in this process then raised a NULL pointer dereference. Fixed this by destroying class after unregistering driver. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Add ioctl command to retreive report size from chardevStefan Achatz2011-02-031-4/+4
| | | | | | | | | | Roccat chardev was reworked to support only a defined report size per device and this can be retreived by an ioctl now to enable future changes in report definitions. Header was moved/renamed from drivers/hid to include/linux for accessibility. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Increase waiting time for Kone[+] to prevent occasional freezesStefan Achatz2011-02-031-1/+1
| | | | | | | | On newer kernels the device freezes occasionally on initialization with just 70msec between reads. Increased this value to safe 100msec. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Introduce module hid-roccat-commonStefan Achatz2011-02-031-96/+39
| | | | | | | | | | | | | Module hid-roccat-common contains functions used by roccat device driver modules to reduce code duplication. At the moment it contains just two wrapper methods for usb_control_msg that ensure that the buffer used for transfer is dma capable which wasn't the case before. The kconfig option is not visible to the user but will be selected by the device specific drivers. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Use new hid_err macrosStefan Achatz2011-02-031-8/+7
| | | | | | | Using the new hid_err macros instead of dev_err. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Fix an error message when reading more data from bin attributesStefan Achatz2011-01-201-0/+3
| | | | | | | | | Using cat or something to read from binary attributes would try to do an additional read with offset equal to filesize. This resulted in an invalid attribute error. This is fixed by giving the right answer instead of EINVAL. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: hid-roccat-koneplus: potential NULL dereferenceVasiliy Kulikov2011-01-171-0/+4
| | | | | | | | | kmalloc() may fail, if so return -ENOMEM. Also koneplus_init_koneplus_device_struct() should check return code of koneplus_get_startup_profile() and propagate its return code. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: roccat: Add support for Roccat Kone[+] v2Stefan Achatz2011-01-081-0/+837
This patch adds support for Roccat Kone[+] gaming mouse. Kone[+] is an enhanced version of the old Kone with more memory for macros, a better sensor and more functionality. This driver is conceptual similar to the existing Kone and Pyra drivers. Userland tools can soon be found at http://sourceforge.net/projects/roccat Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
OpenPOWER on IntegriCloud