aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-10-29HID: roccat: Fix code style issuesHans Duedal1-4/+5
Missing whitespace, semi-colon after macro, and a duplicated out of memory message. Signed-off-by: Hans Duedal <hans.duedal@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: usbhid: prevent unwanted events to be sent when re-opening the deviceBenjamin Tissoires2-12/+25
When events occurs while no one is listening to the node (hid->open == 0 and usb_kill_urb() called) some events are still stacked somewhere in the USB (kernel or device?) stack. When the node gets reopened, these events are drained, and this results in spurious touch down/up, or mouse button clicks. The problem was spotted with touchscreens in fdo bug #81781 [1], but it actually occurs with any mouse using hid-generic or touchscreen. A way to reproduce it is to call: $ xinput disable 9 ; sleep 5 ; xinput enable 9 With 9 being the device ID for the touchscreen/mouse. During the "sleep", produce some touch events or click events. When "xinput enable" is called, at least one click is generated. This patch tries to fix this by draining the queue for 50 msec and during this time frame, not forwarding these old events to the hid layer. Hans completed the explanation: """ Devices like mice (basically any hid device) will have a fifo on the device side, when we stop submitting urbs to get hid reports from it, that fifo will fill up, and when we resume we will get whatever is there in that fifo. """ [1] https://bugs.freedesktop.org/show_bug.cgi?id=81781 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: input: Fix TransducerSerialNumber implementationJason Gerecke1-1/+4
The commit which introduced TransducerSerialNumber (368c966) is missing two crucial implementation details. Firstly, the commit does not set the type/code/bit/max fields as expected later down the code which can cause the driver to crash when a tablet with this usage is connected. Secondly, the call to 'set_bit' causes MSC_PULSELED to be sent instead of the expected MSC_SERIAL. This commit addreses both issues. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-hidpp: support combo keyboard touchpad TK820Benjamin Tissoires1-0/+20
The TK820 presents both a keyboard and a touchpad on the same physical (and logical device). Use the generic hid-input processing for the keyboard part. The keyboard input device is created when the receiver is plugged in, so no events are missed on connect. When the device actaully connects, we can set it to use the raw multitouch reporting to have a consistent user experience accross all Logitech touchpads. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-hidpp: add support of the first Logitech Wireless TouchpadBenjamin Tissoires1-5/+27
This touchpad differs from the T650 in several ways: - the resolution is not correctly returned by the device - it presents physical buttons, so the button flag in the raw touch report is not filled. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-hidpp: Add Wireless Touchpad T650 supportBenjamin Tissoires1-2/+103
All the bits are now in place to add the support of the Touchpad T650. The creation/population of the input device is delayed until the device is ready. The T650 uses the special HID++ reporting protocol, so activate this on connect. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-hidpp: late bind the input device on wireless connectionBenjamin Tissoires1-8/+147
Now that the receiver forwards the connect/disconnect events, we can know when the device is available to communicate with us. When it is ready, we can for instance retrieve its full name, which guarantee that we always have the same name for the DJ device (the DJ name is somewhat shorter than the HID++ name). This mechanism is mandatory for the touchpads line, which has the min/max information stored in the device. This information can only be retrieved when the device is connected. So we can not populate the input device until we are sure that the device is connected. This patch creates a new input device for such devices. However, this input is not bound to hid directly, so the various drivers which wants to use it are required to process completely the incoming reports in .raw_event(). Note that the patch in itself just adds the bits for the next ones, and this feature is disabled by default. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-dj: enable notifications on connect/disconnectBenjamin Tissoires1-1/+26
The receiver can send HID++ notifications to the DJ devices when the physical devices are connected/disconnected. Enable this feature by default. This command uses a HID++ command instead of a DJ one, so use a direct call to usbhid instead of using logi_dj_recv_send_report() Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech: allow the DJ device to request the unifying nameBenjamin Tissoires2-7/+97
The names of the DJ devices are stored in the receiver. These names can be retrieved through a HID++ command. However, the protocol says that you have to ask the receiver for that, not the device iteself. Introduce a special case in the DJ handling where a device can request its unifying name, and when such a name is given, forward it also to the corresponding device. On the HID++ side, the receiver talks only HID++ 1.0, so we need to implement this part of the protocol in the module. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-dj: allow transfer of HID++ reports from/to the correct dj deviceBenjamin Tissoires1-28/+160
HID++ is a Logitech-specific protocol for communicating with HID devices. DJ devices implement HID++, and so we can add the HID++ collection in the report descriptor and forward the incoming reports from the receiver to the appropriate DJ device. The same can be done in the other way, if someone calls a .raw_request(), we can forward it to the correct dj device by overriding the device_index in the HID++ report. Signed-off-by: Benjamin Tisssoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech: move dj devices to the HID++ moduleBenjamin Tissoires3-49/+15
Devices connected through the Logitech Wireless Receiver are HID++ devices. We can handle them here to benefit from this new module and activate enhaced support of the various wireless touchpad or mice with touch sensors on them. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: Introduce hidpp, a module to handle Logitech hid++ devicesBenjamin Tissoires5-0/+856
Logitech devices use a vendor protocol to communicate various information with the device. This protocol is called HID++, and an exerpt can be found here: https://drive.google.com/folderview?id=0BxbRzx7vEV7eWmgwazJ3NUFfQ28&usp=shar The main difficulty which is related to this protocol is that it is a synchronous protocol using the input reports. So when we want to get some information from the device, we need to wait for a matching input report. This driver introduce this capabilities to be able to support the multitouch mode of the Logitech Wireless Touchpad T651 (the bluetooth one). The multitouch data is available directly from the mouse input reports, and we just need to query the device on connect about its caracteristics. HID++ and the touchpad features has a specific reporting mode which uses pure HID++ reports, but Logitech told us not to use it for this specific device. During QA, they detected that some bluetooth input reports where lost, and so the only supported mode is the pointer mode. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-dj: merge header file into the sourceBenjamin Tissoires2-116/+87
There is no point in keeping the header in a separate file, nobody but hid-logitech-dj should have access to its content. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: logitech-dj: rely on hid groups to separate receivers from dj devicesBenjamin Tissoires2-38/+10
Several benefits here: - we can drop the macro is_dj_device: I never been really conviced by this macro as we could fall into a null pointer anytime. Anyway time showed that this never happened. - we can simplify the hid driver logitech-djdevice, and make it aware of any new receiver VID/PID. - we can use the Wireless PID of the DJ device as the product id of the hid device, this way the sysfs will differentiate between different DJ devices. Signed-off-by: Benjamin Tisssoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: core: do not scan reports if the group is already setBenjamin Tissoires1-1/+2
This allows the transport layer (I have in mind hid-logitech-dj and uhid) to set the group before it is added to the hid bus. This way, it can bypass the hid_scan_report() call, and choose in advance which driver will handle the newly created hid device. Signed-off-by: Benjamin Tisssoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-29HID: fix merge from wacom into the HID treeBenjamin Tissoires1-10/+7
While merging wacom from the input to the hid tree, some comments have been duplicated. We can also integrate the test for Synaptics devices in the switch case below, so it is clear that there will be only one place for such quirks. No functional changes are expected in this commit. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-22HID: input: Map unknown consumer page codes to KEY_UNKNOWNHans de Goede1-1/+1
Currently unknown consumer page codes are ignored, which means that they cannot later be mapped from userspace using udev / hwdb. Map them to KEY_UNKNOWN, so that userspace can remap them for keyboards which make up their own consumer page codes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-20HID: add keyboard input assist hid usagesOlivier Gay2-0/+13
Add keyboard input assist controls usages from approved hid usage table request HUTTR42: http://www.usb.org/developers/hidpage/HUTRR42c.pdf Signed-off-by: Olivier Gay <ogay@logitech.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-10HID: usbhid: enable always-poll quirk for Elan Touchscreen 016fAdel Gadllah2-0/+2
This device needs the quirk as well. Tested-by: Kevin Fenzi <kevin@scrye.com> Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-10HID: usbhid: enable always-poll quirk for Elan Touchscreen 009bAdel Gadllah2-0/+2
This device needs the quirk as well. Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-09Merge tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpioLinus Torvalds1-4/+2
Pull GPIO changes from Linus Walleij: "This is the bulk of GPIO changes for the v3.18 development cycle: - Increase the default ARCH_NR_GPIO from 256 to 512. This was done to avoid having a custom <asm/gpio.h> header for the x86 architecture - GPIO is custom and complicated enough as it is already! We want to move to a radix to store the descriptors going forward, and finally get rid of this fixed array size altogether. - Endgame patching of the gpio_remove() semantics initiated by Abdoulaye Berthe. It is not accepted by the system that the removal of a GPIO chip fails during eg reboot or shutdown, and therefore the return value has now painfully been refactored away. For special cases like GPIO expanders on a hot-pluggable bus like USB, we may later add some gpiochip_try_remove() call, but for the cases we have now, return values are moot. - Some incremental refactoring of the gpiolib core and ACPI GPIO library for more descriptor usage. - Refactor the chained IRQ handler set-up method to handle also threaded, nested interrupts and set up the parent IRQ correctly. Switch STMPE and TC3589x drivers to use this registration method. - Add a .irq_not_threaded flag to the struct gpio_chip, so that also GPIO expanders that block but are still not using threaded IRQ handlers. - New drivers for the ARM64 X-Gene SoC GPIO controller. - The syscon GPIO driver has been improved to handle the "DSP GPIO" found on the TI Keystone 2 SoC:s. - ADNP driver switched to use gpiolib irqchip helpers. - Refactor the DWAPB driver to support being instantiated from and MFD cell (platform device). - Incremental feature improvement in the Zynq, MCP23S08, DWAPB, OMAP, Xilinx and Crystalcove drivers. - Various minor fixes" * tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (52 commits) gpio: pch: Build context save/restore only for PM pinctrl: abx500: get rid of unused variable gpio: ks8695: fix 'else should follow close brace '}'' gpio: stmpe: add verbose debug code gpio: stmpe: fix up interrupt enable logic gpio: staticize xway_stp_init() gpio: handle also nested irqchips in the chained handler set-up gpio: set parent irq on chained handlers gpiolib: irqchip: use irq_find_mapping while removing irqchip gpio: crystalcove: support virtual GPIO pinctrl: bcm281xx: make Kconfig dependency more strict gpio: kona: enable only on BCM_MOBILE or for compile testing gpio, bcm-kona, LLVMLinux: Remove use of __initconst gpio: Fix ngpio in gpio-xilinx driver gpio: dwapb: fix pointer to integer cast gpio: xgene: Remove unneeded #ifdef CONFIG_OF guard gpio: xgene: Remove unneeded forward declation for struct xgene_gpio gpio: xgene: Fix missing spin_lock_init() gpio: ks8695: fix switch case indentation gpiolib: add irq_not_threaded flag to gpio_chip ...
2014-10-06Merge branches 'for-3.18/always-poll-quirk', 'for-3.18/logitech', 'for-3.18/picolcd', 'for-3.18/rmi', 'for-3.18/sony', 'for-3.18/uhid', 'for-3.18/upstream' and 'for-3.18/wacom' into for-linusJiri Kosina21-1266/+5776
2014-10-01HID: uHID: fix excepted report typeBenjamin Tissoires1-1/+1
When uhid_get_report() or uhid_set_report() are called, they emit on the char device a UHID_GET_REPORT or UHID_SET_REPORT message. Then, the protocol says that the user space asnwers with UHID_GET_REPORT_REPLY or UHID_SET_REPORT_REPLY. Unfortunatelly, the current code waits for an event of type UHID_GET_REPORT or UHID_SET_REPORT instead of the reply one. Add 1 to UHID_GET_REPORT or UHID_SET_REPORT to actually wait for the reply, and validate the reply. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-01HID: usbhid: add another mouse that needs QUIRK_ALWAYS_POLLOliver Neukum2-0/+2
There is a second mouse sharing the same vendor strings but different IDs. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-01HID: wacom: implement the finger part of the HID generic handlingBenjamin Tissoires3-3/+164
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-01HID: wacom: implement generic HID handling for pen generic devicesBenjamin Tissoires5-2/+206
ISDv4 and v5 are plain HID devices. We can directly implement a generic HID parsing/handling and remove the need to manually add those PID in the list of supported devices. This patch implements the pen support only. The finger part will come in a later patch. To be properly notified of an .event() and a .report(), we need to force hid-core to go through the HID parsing. By default, wacom.ko binds only hidraw, so the hid parsing is not done by hid-core. When a true HID device is there, we add the flag HID_CLAIMED_DRIVER to hid->claimed which will force hid-core to parse the incoming reports. (Note that this can be easily backported by directly setting the .claimed flag to HID_CLAIMED_DRIVER even if hid-core does not support HID_CONNECT_DRIVER) Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-01HID: wacom: move allocation of inputs earlierBenjamin Tissoires1-3/+9
This allows to have the input devices ready in while parsing the reports descriptor. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-01HID: wacom: split out input allocation and registrationBenjamin Tissoires2-33/+64
If the input can be created earlier during probe, we can already populate them while reading the report descriptor. This way, we can rely on the hid subsystem directly for tablets which already provide a meaningful report descriptor (like ISDv4-5). This patch only splits the allocation and registration, but do not change where we allocate the input. This will come in a later patch. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-10-01HID: wacom: rename failN with some meaningful informationBenjamin Tissoires1-20/+29
When we have to deal with new elements in probe, having the exit labels named sequencially is a pain to maintain. Put a meaningful name instead so that we do not have to renumber them on inserts. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-25HID: sony: Update the DualShock 4 touchpad resolutionFrank Praznik1-2/+2
The DualShock 4 touchpad has been measured to have a resolution of 44.86 dots/mm which equates to 1920x942. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-22HID: wacom: fix timeout on probe for some wacomsBenjamin Tissoires1-2/+16
Some Wacom tablets (at least the ISDv4 found in the Lenovo X230) timeout during probe while retrieving the input reports. The only time this information is valuable is during the feature_mapping stage, so we can ask for it there and discard the generic input reports retrieval. This gives a code path closer to the wacom.ko driver when it was in the input subtree (not HID). Cc: stable@vger.kernel.org # requires cherry-pick of c64d883476 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-22HID: sony: Set touchpad bits in the input_configured callbackFrank Praznik1-34/+40
Set the DualShock4 touchpad bits in the input_configured callback so that they are registered properly for any input devices created during hid_hw_start. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-18driver:gpio remove all usage of gpio_remove retval in driverabdoulaye berthe1-4/+2
this remove all reference to gpio_remove retval in all driver except pinctrl and gpio. the same thing is done for gpio and pinctrl in two different patches. Signed-off-by: Abdoulaye Berthe <berthe.ab@gmail.com> Acked-by: Michael Büsch <m@bues.ch> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-09-15HID: sony: Update file header and correct commentsFrank Praznik1-5/+6
Update the file header and correct an outdated comment block. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-15HID: sony: Corrections for the DualShock 4 HID descriptorFrank Praznik1-6/+6
Fix a few minor issues in the HID descriptor: - A 6 bit entry had a logical maximum of 255 when the largest it can be is 63. - A logical max value was incorrectly being set to -1 instead of 255. - Set the min/max of the gyroscopes to -8192/8191 as that is the range of values which represent the true controller orientation. Any values beyond those extents are just noise. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-12HID: rmi: check sanity of the incoming reportBenjamin Tissoires1-6/+38
In the Dell XPS 13 9333, it appears that sometimes the bus get confused and corrupts the incoming data. It fills the input report with the sentinel value "ff". Synaptics told us that such behavior does not comes from the touchpad itself, so we filter out such reports here. Unfortunately, we can not simply discard the incoming data because they may contain useful information. Most of the time, the misbehavior is quite near the end of the report, so we can still use the valid part of it. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1123584 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-12HID: wacom: make the WL connection friendly for the desktopBenjamin Tissoires2-1/+4
Currently, tablets connected to the WL receiver all share the same VID/PID. There is no way for the user space to know which one is which besides parsing the name. We can force the PID to be set to the actual hardware. This way, the input device will have the correct PID which can be match in libwacom. With only this trick, the pad input does not inherit the ID_INPUT_TABLET udev property from its parent. We can force udev to accept it by declaring a BTN_STYLUS which is never used. This way, tablets connected through WL can be used from the user point of view in the same way they are used while connected through wire. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-11HID: wacom - enable LED support for Wireless Intuos5/ProPing Cheng1-17/+35
And associate all LED/OLED to PAD device Signed-off-by: Ping Cheng <pingc@wacom.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-11HID: wacom - remove report_id from wacom_get_report interfacePing Cheng1-4/+4
It is assigned in buf[0] anyway. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-11HID: wacom - Clean up of sysfsPing Cheng1-2/+10
changed to scnprintf(buf, PAGE_SIZE, ... ) as suggested in sysfs.txt for show functions Signed-off-by: Paul A. Tessier <phernost@gmail.com> Signed-Off-by: Ping Cheng <pingc@wacom.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-11HID: wacom - Add default permission defines for sysfs attributesPing Cheng1-4/+7
RW : ug=rw,o=r WO : ug=w And enabled reading relavent sysfs attributes. Signed-off-by: Paul A. Tessier <phernost@gmail.com> Signed-Off-by: Ping Cheng <pingc@wacom.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-08HID: usbhid: fix PIXART optical mouseOliver Neukum2-0/+2
This mouse keeps disconnecting in runlevel 3. It needs the ALWAYS_POLL quirk. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-08HID: Add Holtek USB ID 04d9:a0c2 ETEKCITY ScrollJohn DeSilva3-0/+6
The report descriptor for the HOLTEK USB ID 04d9:a0c2 (ETEKCITY Scroll T-140 Gaming Mouse) is set to a very large amount of consumer usages (2^16), exceeding HID_MAX_USAGES. Added id, bindings and comments for the mouse, added to hid_have_special_driver, and reduced the usage and logical maximums to 0x2fff, consistent with the other mice in the category. Tested on the hardware. Signed-off-by: John C. DeSilva <desilvjo@umich.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-08HID: fix ignore_special_drivers modparam descriptionHans Petter Selasky1-1/+1
Signed-off-by: Hans Petter Selasky <hps@selasky.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-08HID: usbhid: enable always-poll quirk for Elan TouchscreenJohan Hovold2-0/+4
Enable the always-poll quirk for Elan Touchscreens found on some recent Samsung laptops. Without this quirk the device keeps disconnecting from the bus (and is re-enumerated) unless opened (and kept open, should an input event occur). Note that while the device can be run-time suspended, the autosuspend timeout must be high enough to allow the device to be polled at least once before being suspended. Specifically, using autosuspend_delay_ms=0 will still cause the device to disconnect on input events. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-08HID: usbhid: add always-poll quirkJohan Hovold1-3/+23
Add quirk to make sure that a device is always polled for input events even if it hasn't been opened. This is needed for devices that disconnects from the bus unless the interrupt endpoint has been polled at least once or when not responding to an input event (e.g. after having shut down X). Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-04HID: add support for PenMount HID TouchScreen DriverChristian Gmeiner5-0/+63
This patch adds a seperate hid-penmount driver to work around an issue with the HID report descriptor. The descriptor does not contain the ContactID usage and as result the touchscreen is represented as normal mouse to the system. This driver maps the button 0 emitted by the touchscreen to BTN_TOUCH. This makes it possible to use touch events in userspace. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-04HID: thingm: fix workqueue race on removeJiri Kosina1-3/+3
thingm_remove_rgb() needs to flush the workqueue after all the LED classes have been unregistered, otherwise the removal might race with another LED event coming, causing thingm_led_set() to schedule additional work after thingm_remove_rgb() has flushed it. This obviously causes oops later, as the scheduled work has been freed in the meantime. In addition to that, move the hid_hw_stop() to an earlier place, so that dmesg is not polluted by failure messages about not being able to write the LED while the device is being shut down. Reported-and-tested-by: Dylan Alex Simon <dylan-kernel@dylex.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-04HID: hid-sensor-hub: re-add mistakenly removed USB_DEVICE_ID_STM_HID_SENSOR idSrinivas Pandruvada1-0/+3
Adding USB_DEVICE_ID_STM_HID_SENSOR again in the quirk table. During 3.16 merge cycle somehow quirk for device id USB_DEVICE_ID_STM_HID_SENSOR is missing. I see commit dde3b45cd74e ("HID: hid-sensor-hub: new device id and quirk for STM Sensor hub") added new id USB_DEVICE_ID_STM_HID_SENSOR_1, but didn't really delete the old device id. Anyway we need to add this back, otherwise it breaks ST sensor hubs. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-03HID: thingm: set the proper error code before leavingBenjamin Tissoires1-0/+1
In case of an unsupported firmware, the driver bails out without setting the LEDs interfaces, but forget to set the proper error code. err is then still equal to 0 and the hid subsytem consider the device to be in perfect shape. When removing it, thingm_remove() tries to unbind the rgb LEDs which has not been created, leading to a segfault. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>