summaryrefslogtreecommitdiffstats
path: root/drivers/hid
Commit message (Collapse)AuthorAgeFilesLines
...
* | | HID: core: do not scan constant input reportBenjamin Tissoires2014-04-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Microsoft Surface Type/Touch Cover 2 is a fancy device which advertised itself as a multitouch device but with constant input reports. This way, hid_scan_report() gives the group MULTITOUCH to it, but hid-multitouch can not handle it due to the constant collection ignored by hid-input. To prevent such crap in the future, and while we do not fix this particular device, make the scan_report coherent with hid-input.c, and ignore constant input reports. CC: stable@vger.kernel.org # 3.12+ Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | Revert "HID: microsoft: Add ID's for Surface Type/Touch Cover 2"Derya2014-04-073-8/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 117309c51dca42121f70cacec801511b76acf75c. The MS Surface Pro 2 has an USB composite device with 3 interfaces - interface 0 - sensor hub - interface 1 - wacom digitizer - interface 2 - the keyboard cover, if one is attached This USB composite device changes it product id dependent on if and which keyboard cover is attached. Adding the covers to hid_have_special_driver prevents loading the right hid drivers for the other two interfaces, all 3 get loaded with hid-microsoft. We don't even need hid-microsoft for the keyboards. We have to revert this to load the right hid modules for each interface. CC: stable@vger.kernel.org # kernel 3.14 only Signed-off-by: Derya <derya.kiran@yahoo.de> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: sensor-hub: add sensor hub quirk for ThinkPad HelixStephen Chandler Paul2014-04-032-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like some of the other laptops/tablets on the market with ultrabook sensors, the ThinkPad Helix's sensor hub requires a special quirk in order for it to power on properly. Without it the sensors are detected by the kernel and set up as usual, but they won't output any data. This will also fix the sensors on any other laptops with the same model of sensor hub. Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: sony: Fix cancel_work_sync mismergeFrank Praznik2014-04-031-2/+0Star
|/ / | | | | | | | | | | | | Remove redundant cancel_work_sync() call caused by mismerge. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-linus' of ↵Linus Torvalds2014-04-0321-565/+2524
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - substantial cleanup of the generic and transport layers, in the direction of an ultimate goal of making struct hid_device completely transport independent, by Benjamin Tissoires - cp2112 driver from David Barksdale - a lot of fixes and new hardware support (Dualshock 4) to hid-sony driver, by Frank Praznik - support for Win 8.1 multitouch protocol by Andrew Duggan - other smaller fixes / device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (75 commits) HID: sony: fix force feedback mismerge HID: sony: Set the quriks flag for Bluetooth controllers HID: sony: Fix Sixaxis cable state detection HID: uhid: Add UHID_CREATE2 + UHID_INPUT2 HID: hyperv: fix _raw_request() prototype HID: hyperv: Implement a stub raw_request() entry point HID: hid-sensor-hub: fix sleeping function called from invalid context HID: multitouch: add support for Win 8.1 multitouch touchpads HID: remove hid_output_raw_report transport implementations HID: sony: do not rely on hid_output_raw_report HID: cp2112: remove the last hid_output_raw_report() call HID: cp2112: remove various hid_out_raw_report calls HID: multitouch: add support of other generic collections in hid-mt HID: multitouch: remove pen special handling HID: multitouch: remove registered devices with default behavior HID: hidp: Add a comment that some devices depend on the current behavior of uniq HID: sony: Prevent duplicate controller connections. HID: sony: Perform a boundry check on the sixaxis battery level index. HID: sony: Fix work queue issues HID: sony: Fix multi-line comment styling ...
| * | HID: sony: fix force feedback mismergeJiri Kosina2014-04-011-4/+0Star
| | | | | | | | | | | | | | | | | | | | | Fix unfortunate mismerge between the fixes and sony branch causing code duplication and unterminated basic block. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | |
| | \
| | \
| | \
| *---. \ Merge branches 'for-3.15/multitouch', 'for-3.15/sony' and 'for-3.15/uhid' ↵Jiri Kosina2014-04-014-178/+196
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into for-linus
| | | | * | HID: uhid: Add UHID_CREATE2 + UHID_INPUT2Petri Gynther2014-04-011-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UHID_CREATE2: HID report descriptor data (rd_data) is an array in struct uhid_create2_req, instead of a pointer. Enables use from languages that don't support pointers, e.g. Python. UHID_INPUT2: Data array is the last field of struct uhid_input2_req. Enables userspace to write only the required bytes to kernel (ev.type + ev.u.input2.size + the part of the data array that matters), instead of the entire struct uhid_input2_req. Note: UHID_CREATE2 increases the total size of struct uhid_event slightly, thus increasing the size of messages that are queued for userspace. However, this won't affect the userspace processing of these events. [Jiri Kosina <jkosina@suse.cz>: adjust to hid_get_raw_report() and hid_output_raw_report() API changes] Signed-off-by: Petri Gynther <pgynther@google.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/sonyJiri Kosina2014-04-0118-161/+1273
| | | |\| |
| | | * | | HID: sony: Set the quriks flag for Bluetooth controllersFrank Praznik2014-04-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Sixaxis and DualShock 4 want HID output reports sent on the control endpoint when connected via Bluetooth. Set the HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP flag for these devices so hidraw write() works properly. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | HID: sony: Fix Sixaxis cable state detectionFrank Praznik2014-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Byte 31 of the Sixaxis report can change depending on whether or not the controller is rumbling. Using bit 3 is the only reliable way to detect the state of the cable regardless of rumble activity. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: multitouch: add support for Win 8.1 multitouch touchpadsAndrew Duggan2014-03-201-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multitouch touchpads built for Win 8.1 need to be sent an input mode feature report in order to start reporting multitouch events. This is the same process sent to Win 7 multitouch touchscreens except the value of the feature report is 3 for touchpads. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: multitouch: add support of other generic collections in hid-mtBenjamin Tissoires2014-03-052-6/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ANTON Touch Pad is a device which can switch from a multitouch touchpad to a mouse. It thus presents several generic collections which are currently ignored by hid-multitouch. Enable them by not ignoring them in mt_input_mapping. Adding also a suffix for them depending on their application. Reported-by: Edel Maks <edelmaks@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: multitouch: remove pen special handlingBenjamin Tissoires2014-03-051-52/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pens have a special handling in hid-mt as hybrid pen/touch devices are quite common now. However, some fancy devices presents also useful collections like mouse or keyboard. The special case for the pen may not be a special case, and treat it as a generic case. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: multitouch: remove registered devices with default behaviorBenjamin Tissoires2014-03-051-118/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default multitouch protocol class in use since the kernel v3.9 is working quite well. Since its inclusion, the only devices we had to tweak were those who really need quirks (GeneralTouch, FocalTech and Wistron, the 3 of them are Win 7 certified ones). The flow of new unhandled devices has stopped, which is great and I think it's time to reduce the list of registered device. This commit removes only the registration in the kernel of devices that use the class MT_CLS_DEFAULT, or that can use it. By that, I mean that I checked all the recordings I have, and the produced input device and events are the same before and after applying the patch. This gives two benefits: - remove a bunch of lines of codes - prevent bad handling of existing registered devices which are using a different protocol while using the same VID/PID (I got the case of a Quanta 3008 recently). I also removed the associated classes (MT_CLS*). I kept their #define in case people use the new_id sysfs node with a non standard class (their should be really few people now, but we never now). This is why there are /* reserved .... */. Last, I add a comment on top of mt_devices[] definition to remember people (and myself) not to include devices for the beauty of it. To people still trying to add devices with the default class: """ Guys, try out your device under a kernel greater or equal to v3.9. If it works, you are all set. Adding your VID/PID to the kernel only brings us overload and you won't get anything from it _because_ even a backport of this shiny patch will _not_ make the device work under 3.0, 3.2, 3.4 or even 3.8. So if it works, it works. If it does not work, then yes, submit a patch or call for help. In any cases, if you want me to do regression tests, I'd be happy to get some traces of your device. But I won't patch the kernel if it works. """ Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | | | Merge branch 'for-3.15/microsoft' into for-linusJiri Kosina2014-04-014-4/+75
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/hid/hid-core.c
| | * | | | | HID: hid-microsoft: Add support for 2 reserved usage ids used on ms office kbHans de Goede2014-02-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: hid-microsoft: Add support for scrollwheel and special keypad keysHans de Goede2014-02-033-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Microsoft Office keyboard has a scrollwheel as well as some special keys above the keypad which are handled through the custom MS usage page, this commit adds support for these. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: hid-microsoft: Do the check for the ms usage page per deviceHans de Goede2014-02-031-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some devices we may also want to do custom mappings for other pages. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: Add some missing HUT mappingsHans de Goede2014-02-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mapping for "AL Next Task/Application", "AL Previous Task/Application" and "AL File Browser" buttons, as found on the Microsoft Office keyboard. Note that there already is a mapping for "AL Local Machine Browser" to KEY_FILE. Unless we ever encounter a device with both that should not be a problem. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | | | | Merge branch 'for-3.15/hid-sensor-hub' into for-linusJiri Kosina2014-04-011-86/+124
| |\ \ \ \ \ \
| | * | | | | | HID: hid-sensor-hub: Processing for duplicate physical idsSrinivas Pandruvada2014-02-171-86/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In HID sensor hub, HID physical ids are used to represent different sensors. For example physical id of 0x73 in usage page = 0x20, represents an accelerometer. The HID sensor hub driver uses this physical ids to create platform devices using MFD. There is 1:1 correspondence between an phy id and a client driver. But in some cases these physical ids are reused. There is a phy id 0xe1, which specifies a custom sensor, which can exist multiple times to represent various custom sensors. In this case there can be multiple instances of client MFD drivers, processing specific custom sensor. In this case when client driver looks for report id or a field index, it should still get the report id specific to its own type. This is also true for reports, they should be directed towards correct instance. This change introduce a way to parse and tie physical devices to their correct instance. Summary of changes: - To get physical ids, use collections. If a collection of type=physical exist then use usage id as in the name of platform device name - As part of the platform data, we assign a hdsev instance, which has start and end of collection indexes. Using these indexes attributes can be tied to correct MFD client instances - When a report is received, call callback with correct hsdev instance. In this way using its private data stored as part of its registry, it can distinguish different sensors even when they have same physical and logical ids. This patch is co-authored with Archana Patni <archna.patni@intel.com>. Reported-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | | HID: hid-sensor-hub: Add selector apiSrinivas Pandruvada2014-02-171-0/+22
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some report descriptors, they leave holes in the selectors. In this case if we use hardcoded selector values, this will result in invalid values. For example, if there is selectors defined for Power State from OFF to D0 to D3. We can't use indexes of these states if some states are not implemented or not present in the report decriptors. In this case, we need to get the indexes from report descriptors. One API is added to get the index of a selector. This API will search for usage id in the field usage list and return the index. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | | | | Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-linusJiri Kosina2014-04-0118-322/+2008
| |\ \ \ \ \ \ | | | |_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/hid/hid-ids.h drivers/hid/hid-sony.c drivers/hid/i2c-hid/i2c-hid.c
| | * | | | | HID: hyperv: fix _raw_request() prototypeJiri Kosina2014-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 3rd argument is pointer to the buffer, not a single __u8. This has no bad sideeffect, as the stub is not using any of its argument, but better have it correct. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: hyperv: Implement a stub raw_request() entry pointK. Y. Srinivasan2014-03-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3c86726cfe38 ("HID: make .raw_request mandatory") made .raw_request mandatory and broke the Hyper-V mouse driver. This patch fixes the problem. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: remove hid_output_raw_report transport implementationsBenjamin Tissoires2014-03-143-27/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody calls hid_output_raw_report anymore, and nobody should. We can now remove the various implementation in the different transport drivers and the declarations. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: sony: do not rely on hid_output_raw_reportBenjamin Tissoires2014-03-143-48/+22Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hid_out_raw_report is going to be obsoleted as it is not part of the unified HID low level transport documentation (Documentation/hid/hid-transport.txt) To do so, we need to introduce two new quirks: * HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP: this quirks prevents the transport driver to use the interrupt channel to send output report (and thus force to use HID_REQ_SET_REPORT command) * HID_QUIRK_SKIP_OUTPUT_REPORT_ID: this one forces usbhid to not include the report ID in the buffer it sends to the device through HID_REQ_SET_REPORT in case of an output report This also fixes a regression introduced in commit 3a75b24949a8 (HID: hidraw: replace hid_output_raw_report() calls by appropriates ones). The hidraw API was not able to communicate with the PS3 SixAxis controllers in USB mode. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | Merge branch 'for-3.15/sony' into for-3.15/hid-core-ll-transport-cleanupJiri Kosina2014-03-142-66/+698
| | |\ \ \ \ \ | | | | |_|/ / | | | |/| | |
| | | * | | | HID: sony: Prevent duplicate controller connections.Frank Praznik2014-02-241-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a Sixaxis or Dualshock 4 controller is connected via USB while already connected via Bluetooth it will cause duplicate devices to be added to the input device list. To prevent this a global list of controllers and their MAC addresses is maintained and new controllers are checked against this list. If a duplicate is found, the probe function will exit with -EEXIST. On USB the MAC is retrieved via a feature report. On Bluetooth neither controller reports the MAC address in a feature report so the MAC is parsed from the uniq string. As uniq cannot be guaranteed to be a MAC address in every case (uHID or the behavior of HIDP changing) a parsing failure will not prevent the connection. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Perform a boundry check on the sixaxis battery level index.Frank Praznik2014-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that an out-of-bounds read doesn't occur in the Sixaxis battery level lookup table in the event that the controller sends an invalid battery status value in the report. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Fix work queue issuesFrank Praznik2014-02-241-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only initialize force feedback for devices that actually support it (Sixaxis and Dualshock 4) to prevent calls to schedule_work() with an uninitialized work queue. Move the cancel_work_sync() call out of sony_destroy_ff() since the state worker is used for the LEDs even when force-feedback is disabled. Remove the sony_destroy_ff() function since it is no longer used. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Fix multi-line comment stylingFrank Praznik2014-02-241-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert multi-line comments to comply with the kernel coding style. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Enable LED controls and rumble for the Sixaxis on Bluetooth.Frank Praznik2014-02-201-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a SIXAXIS_CONTROLLER macro to simplify conditionals where the connection type is irrelevant. Enable the LED and force feedback controls for Sixaxis controllers connected via Bluetooth. Send Sixaxis Bluetooth output reports on the control channel. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Correct Sixaxis battery reportingFrank Praznik2014-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The battery_charging and cable_state flags were backwards on the Sixaxis. The low bit of report byte 30 is 0 when charging and 1 when not. Bit 5 of byte 31 is 0 when a USB cable is connected and 1 when not. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Add conditionals to enable all features in Bluetooth modeFrank Praznik2014-02-171-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the conditionals to enable rumble, battery reporting, LED and touchpad support for the Dualshock 4 in Bluetooth mode. Add dualshock4_set_operational_bt to initialize the controller to the proper operational state. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Set initial battery level to 100% to avoid false low battery warningsFrank Praznik2014-02-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the initial battery level to 100% to avoid false low battery warnings if the battery state is polled before a report with the actual battery level is received. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Add Dualshock 4 Bluetooth battery and touchpad parsingFrank Praznik2014-02-171-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Dualshock 4 battery and touchpad parsing for Bluetooth reports. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Add Dualshock 4 Bluetooth output report formattingFrank Praznik2014-02-171-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add formating for the Dualshock 4 output report data in Bluetooth mode. In Bluetooth mode the Dualshock 4 wants output reports sent on the control channel. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Add modified Dualshock 4 Bluetooth HID descriptorFrank Praznik2014-02-171-0/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, the Dualshock 4 sends controller data via report 1. Once a valid output report 0x11 is received or a feature report of type 0x02 is requested the controller changes from sending data in report 1 to sending data in report 17, which is unmapped in the default descriptor. The mappings have to be moved to report 17 to let the HID driver properly process the incoming reports. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: sony: Use low-level transport driver functionsFrank Praznik2014-02-171-42/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to the low-level transport driver functions. sony_set_output_report is removed since it is no longer used. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/sonyJiri Kosina2014-02-1712-132/+170
| | | |\ \ \ \
| | | * | | | | HID: hid-sony: report actual brightness value when reading LEDSimon Wood2014-02-061-6/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Dualshock4 controller contains a RGB LED, which is enabled via the '/sys/class/leds' interface. At present the driver only returns whether each of the RGB LEDs is lit (ie not off), but no indication of it's brightness. This patch fixes the reading of the current brightnes so that it returns the value (rather than just off=0, on=LED_FULL). Tested on the DS4 and SixAxis (for compatibility). Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | | HID: Kconfig updates for the Sony moduleFrank Praznik2014-02-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the HID_SONY config with 'select POWER_SUPPLY' to fix build issues relating to undefined references to the power_supply_* functions in certain build configurations. Update the description text to reflect that Playstation 4 controllers are now supported. [jkosina@suse.cz: drop the POWER_SUPPLY hunk, as I've already fixed that] Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | | HID: sony: fix build wrt. power_supplyJiri Kosina2014-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sony driver now makes use of power supply support. Make kernel config aware of it. Reported-by: fengguang.wu@intel.com Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | | HID: sony: add output events for the multi-touch pad on the Dualshock 4Frank Praznik2014-01-281-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add output events for the multi-touch pad on the Dualshock 4. The touchpad has a resolution of 1920x940 and is capable of 2 simultaneous touches. A 'Type B' stateful slot protocol is implemented as defined in Documentation/input/multi-touch-protocol.txt Applications can use the touchpad data by processing the ABS_MT_SLOT, ABS_MT_TRACKING_ID, ABS_MT_POSITION_X and ABS_MT_POSITION_Y events. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | | HID: sony: add battery status reporting for the Sixaxis and Dualshock 4Frank Praznik2014-01-281-1/+185
| | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add battery status reporting for the Sixaxis and Dualshock 4 controllers. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: cp2112: remove the last hid_output_raw_report() callBenjamin Tissoires2014-03-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests have shown that output reports use hid_hw_output_report(). Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | HID: cp2112: remove various hid_out_raw_report callsBenjamin Tissoires2014-03-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hid_out_raw_report is going to be obsoleted as it is not part of the unified HID low level transport documentation (Documentation/hid/hid-transport.txt) hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT); is strictly equivalent to: hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf), HID_FEATURE_REPORT, HID_REQ_SET_REPORT); Then replace buf[0] by the appropriate define. So use the new api. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | | Merge branch 'for-3.15/hid-cp2112' into for-3.15/hid-core-ll-transport-cleanupJiri Kosina2014-03-145-0/+1080
| | |\ \ \ \ \ | | | |_|_|/ / | | |/| | | |