- 19 12月, 2016 3 次提交
-
-
由 Roderick Colenbrander 提交于
When the DS4 dongle is connected, it always generates HID reports even when no DS4 is paired to it. This patch adds logic to ignore HID reports from the dongle if there is no DS4 currently attached. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
The DS4 MAC address is reported as a unique identified when using Bluetooth. For USB there is no unique identifier reported yet, so use the MAC address. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
The error handling code in sony_input_configured in general uses goto based cleanup. Recently we migrated code from sony_probe to here, but we didn't update the existing touchpad registration code, which was already here to use the goto. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 29 11月, 2016 1 次提交
-
-
由 Roderick Colenbrander 提交于
Add support for USB based DS4 dongle device, which allows connecting a DS4 through Bluetooth, but hides Bluetooth from the host system. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 28 11月, 2016 3 次提交
-
-
由 Roderick Colenbrander 提交于
The DS4 side of hid-sony used the hid-core layer to assign buttons and axes based on the HID report descriptors. The default mapping was strange e.g. right stick using ABS_Z/ABS_RZ or the physical 'south button' being reported as BTN_EAST etcetera. This patch makes the DS4 side ofi the hid-sony driver comply to the Linux game controller spec as suggested in a discussion with Dmitry on the linux-input list. Currently the main user of the DS4 is the SDL2 library, which has a mapping table using vendor/device/version as a key. In order to not break SDL2 we discussed adjusting the version number, so it can have both mappings. This was discust on linux-input and we discussed privately with SDL2 developers. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
The dualshock 4 supports both analog sticks of which one uses ABS_X/_Y and a touchpad. In a recent discussion with Dmitry about some input-mt changes we proposed for disabling pointer emulation from input_mt_sync_frame, Dmitry mentioned ABS_X/_Y should report the same data as ABS_MT_POSITION_X/_Y. The current driver is mixing axes for different subdevices. It was suggested to make the touchpad its own sub-device. This patch turns the touchpad into its own device. In addition this patch also moves the button underneath the touchpad into the new device. It felt like this button should be part of the device. No known user space application (not even SDL2) seems to be using it. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
A previous patch moved most input initialization from sony_probe to sony_input_configured to avoid some race conditions. The driver has some special logic to prevent the device to get registered twice in case the user connects it both over Bluetooth and USB. When this condition happens sony_input_configured returns a failure, but sony_probe continues as hid_hw_start doesn't fail. As was discussed on linux-input, it is acceptable for this function to fail. This patch adds a check for the HID_CLAIMED_INPUT flag within sony_probe to determine whether initialization succeeded correctly. The flag is not set by the HID layer when sony_input_configured fails. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 10 10月, 2016 7 次提交
-
-
由 Roderick Colenbrander 提交于
Support additional DS4 model. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
The motion sensor values are 16-bit, so make the value range match. It is hard to reach the upper values, but they can be reached. At least the current accelerometer value of 8192 is very easy to pass. It is still not nice that the motion sensors live in no man's land in between ABS_MISC and ABS_MT_SLOT, but that's something for another time, which the proposed ABS_ACCEL_*/ABS_GYRO_* were meant for. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
Read the touch history field in the HID descriptor and use this value to determine how many touch events to read from the report. As part of this patch, we did a first attempt of making the offset calculation code less magical. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
Add a CRC value to each output report. This removes the need for the 'no output reports on interrupt end-point' quirk. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
Put the report type (feature / output) in the report size definitions. This prevents name collisions later on for other different reports, which use the same report id, but have a different size. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Roderick Colenbrander 提交于
Early on the sony_probe function calls hid_hw_start to start the hardware. Afterwards it issues some hardware requests, initializes other functionality like Force Feedback, power classes and others. However by the time hid_hw_start returns, the device nodes have already been created, which leads to a race condition by user space applications which may detect the device prior to completion of initialization. We have observed this problem many times, this patch fixes the problem. This patch moves most of sony_probe to sony_input_configured, which is called prior to device registration. This fixes the race condition and the same approach is used in other HID drivers. Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 26 9月, 2016 3 次提交
-
-
由 Frank Praznik 提交于
Update the copyright notice with the current year and add a note about values for controlling the Dualshock 4 reporting rate. Processing reports at the default full rate of 1000hz can be too demanding for some low-power embedded processors so noting alternate values for people working with this hardware can be useful. Thanks to Rostislav Pehlivanov for finding these values. Signed-off-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
When initially connected via USB the Sixaxis isn't fully initialized until the PS logo button is pressed and won't send any input reports nor will any state set by output reports be retained. This adds a 'defer_initialization' flag to the sony_sc struct which, when set, will delay sending any output reports until the first input report has arrived. This flag is used with the USB Sixaxis to ensure that any state sent will persist since, until the PS button is pushed, any changes sent to the controller via an output report will be lost after a couple of seconds. The initial state of the controller is still configured at the time of the initial connection and won't be internally modified after that, so any state set by the user between that time and the recepit of the first input report won't be lost. Signed-off-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Some USB-only devices which masquerade as Sixaxis controllers report the same generic Bluetooth address for all hardware when queried via the HID report. This causes these devices to be wrongly rejected as duplicates when more than one is connected at once. This introduces a connection type comparison when checking for duplicates and only rejects the newly connected device if the existing matching device is connected using a different connection protocol. The results of the connection type comparison are also used when registering power supply info as the device Bluetooth address is used as the unique identifier string. In cases where more than one valid device has the same Bluetooth address the device ID is now appended to the power supply name string to avoid name collisions when registering the power supply information. Signed-off-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 02 8月, 2016 1 次提交
-
-
由 Mikko Perttunen 提交于
The FutureMax Dance Mat claims to be a SixAxis controller but breaks if descriptor fixups are applied. Detect the device using its USB product string and disable fixups when it is detected. Signed-off-by: NMikko Perttunen <mperttunen@nvidia.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 10 2月, 2016 3 次提交
-
-
由 Pavel Machek 提交于
Double-underscore prefixed types are unnecessary in pure kernel code, replace them with the non prefixed equivalents. Signed-off-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
WARNING: Block comments use a trailing */ on a separate line #822: FILE: drivers/hid/hid-sony.c:822: + * number but it's not needed for correct operation */ WARNING: Block comments use a trailing */ on a separate line #828: FILE: drivers/hid/hid-sony.c:828: + * buttons multiple keypresses are allowed */ WARNING: Block comments use a trailing */ on a separate line #854: FILE: drivers/hid/hid-sony.c:854: + * 0xff and 11th is for press indication */ WARNING: Missing a blank line after declarations #1930: FILE: drivers/hid/hid-sony.c:1930: + struct sony_sc *sc = container_of(work, struct sony_sc, state_worker); + sc->send_output_report(sc); WARNING: Block comments use a trailing */ on a separate line #2510: FILE: drivers/hid/hid-sony.c:2510: + * Logitech joystick from the device descriptor. */ Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
./scripts/checkpatch.pl \ --types "SPACING,TRAILING_WHITESPACE,POINTER_LOCATION,CODE_INDENT" \ -f drivers/hid/hid-sony.c ERROR: trailing whitespace #933: FILE: drivers/hid/hid-sony.c:933: +^I * $ ERROR: space prohibited after that open square bracket '[' #947: FILE: drivers/hid/hid-sony.c:947: + [ 1] = BTN_TRIGGER_HAPPY1, ERROR: space prohibited after that open square bracket '[' #948: FILE: drivers/hid/hid-sony.c:948: + [ 2] = BTN_TRIGGER_HAPPY2, ERROR: space prohibited after that open square bracket '[' #949: FILE: drivers/hid/hid-sony.c:949: + [ 3] = BTN_TRIGGER_HAPPY3, ERROR: space prohibited after that open square bracket '[' #950: FILE: drivers/hid/hid-sony.c:950: + [ 4] = BTN_TRIGGER_HAPPY4, ERROR: space prohibited after that open square bracket '[' #951: FILE: drivers/hid/hid-sony.c:951: + [ 5] = BTN_TRIGGER_HAPPY5, ERROR: space prohibited after that open square bracket '[' #952: FILE: drivers/hid/hid-sony.c:952: + [ 6] = BTN_TRIGGER_HAPPY6, ERROR: space prohibited after that open square bracket '[' #953: FILE: drivers/hid/hid-sony.c:953: + [ 7] = BTN_TRIGGER_HAPPY7, ERROR: space prohibited after that open square bracket '[' #954: FILE: drivers/hid/hid-sony.c:954: + [ 8] = BTN_TRIGGER_HAPPY8, ERROR: space prohibited after that open square bracket '[' #955: FILE: drivers/hid/hid-sony.c:955: + [ 9] = BTN_TRIGGER_HAPPY9, ERROR: "(foo*)" should be "(foo *)" #1032: FILE: drivers/hid/hid-sony.c:1032: + void(*send_output_report)(struct sony_sc*); WARNING: missing space after return type #1032: FILE: drivers/hid/hid-sony.c:1032: + void(*send_output_report)(struct sony_sc*); ERROR: "(foo*)" should be "(foo *)" #2261: FILE: drivers/hid/hid-sony.c:2261: + void(*send_output_report)(struct sony_sc*)) WARNING: missing space after return type #2261: FILE: drivers/hid/hid-sony.c:2261: + void(*send_output_report)(struct sony_sc*)) ERROR: code indent should use tabs where possible #2449: FILE: drivers/hid/hid-sony.c:2449: + */$ total: 13 errors, 2 warnings, 2570 lines checked Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 30 1月, 2016 1 次提交
-
-
由 Antonio Ospite 提交于
Signed-off-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 1月, 2016 3 次提交
-
-
由 Scott Moreau 提交于
The nyko core controller uses the same output report format as the sixaxis controllers, but it expects the report id at offset 1. This does not interfere with the official controllers as this byte is considered a padding byte by the current code. Signed-off-by: NScott Moreau <oreaus@gmail.com> Acked-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Scott Moreau 提交于
This adds rumble and LED support for nyko core controllers using the sino lite chip vendor:1345 product:3008, for PS3. Setting operational mode and output reports are the same as sixaxis but the input report has a different format since the PS3 accepts HID usb devices. For it to work, an exception is needed to skip overriding the report descriptor and use the original one. Signed-off-by: NScott Moreau <oreaus@gmail.com> Acked-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
When setting the operational mode, some third party (Speedlink Strike-FX) gamepads refuse the output report. Failing here means we refuse to initialize the gamepad while this should be harmless. The weird part is that the initial commit that added this: a7de9b86 ("HID: sony: Enable Gasia third-party PS3 controllers") mentions this very same controller as one requiring this output report. Anyway, it's broken for one user at least, so let's change it. We will report an error, but at least the controller should work. And no, these devices present themselves as legacy Sony controllers (VID:PID of 054C:0268, as in the official ones) so there are no ways of discriminating them from the official ones. https://bugzilla.redhat.com/show_bug.cgi?id=1255325Reported-and-tested-by: NMax Fedotov <thesourcehim@gmail.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 28 12月, 2015 1 次提交
-
-
由 Geliang Tang 提交于
Use to_hid_device() instead of container_of(). Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 11月, 2015 3 次提交
-
-
由 Frank Praznik 提交于
Sony has modified the HID descriptor in new revisions of the Dualshock 4 which causes the size check in the descriptor replacement function to fail. Remove it so that new revisions of the controller will work correctly. The module is completely replacing the descriptor instead of patching it, so the size check isn't really necessary anyways. Signed-off-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
On hardware which provides standby power for charging devices the state of the LEDs and force-feedback on controllers can persist even when the system is in standby. Additionally, the state of the controllers on resume may be different from the state they were in at the time when they were suspended (ie. LEDs are cleared on resume). This implements the suspend and resume callbacks which saves and clears the state of the LEDs on suspend and restores them on resume. Force-feedback is stopped on suspend but not automatically restored on resume until a new event is received to avoid potentially damaging hardware. USB Sixaxis and navigation controllers must be reinitialized when the hardware is reset on resume or they won't send any input reports. Signed-off-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Refactor the output report sending functions to allow for the sending of output reports without enqueuing a work item. Output reports for any device can now be sent via the send_output_report function pointer in the sony_sc struct which points to the appropriate output function. The individual state worker functions have been replaced with a universal sony_state_worker function which uses this function pointer. Signed-off-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 06 11月, 2015 1 次提交
-
-
由 Dmitry Torokhov 提交于
When configuring input device via input_configured callback we may encounter errors (for example input_mt_init_slots() may fail). Instead of continuing with half-initialized input device let's allow driver indicate failures. Signed-off-by: NJaikumar Ganesh <jaikumarg@android.com> Signed-off-by: NArve Hjønnevåg <arve@android.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Acked-by: NNikolai Kondrashov <Nikolai.Kondrashov@redhat.com> Acked-by: NAndrew Duggan <aduggan@synaptics.com> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 30 9月, 2015 1 次提交
-
-
由 Dmitry Torokhov 提交于
When configuring input device via input_configured callback we may encounter errors (for example input_mt_init_slots() may fail). Instead of continuing with half-initialized input device let's allow driver indicate failures. Signed-off-by: NJaikumar Ganesh <jaikumarg@android.com> Signed-off-by: NArve Hjønnevåg <arve@android.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Acked-by: NNikolai Kondrashov <Nikolai.Kondrashov@redhat.com> Acked-by: NAndrew Duggan <aduggan@synaptics.com> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 31 7月, 2015 1 次提交
-
-
由 Rostislav Pehlivanov 提交于
This commit removes the cap on the DualShock 4 controller reporting rate when connected using Bluetooth. The previous value of '0xB0' capped the rate to only 20.83 Hz which many userspace utilities mistook as a sign of a bad signal. Since a 'B' and an '8' can look similar it's possible that someone mistook the one for another. The new value of '0x80' enables the full 1000 Hz peak reporting rate that the controller is capable of. Frank adds: "Back when the original code was written the purpose of that value was unknown and 0xB0 seemed to work so that's what ended up being used. Now that we know what it actually does and that 0x80 is a better choice I support this patch." [jkosina@suse.com: update changelog] Signed-off-by: NRostislav Pehlivanov <atomnuker@gmail.com> Acked-by: NFrank Praznik <frank.praznik@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.com>
-
- 24 7月, 2015 1 次提交
-
-
由 Frank Praznik 提交于
When connected via Bluetooth the sixaxis periodically sends reports with an ID of 1, the second byte 0xff and the rest zeroed. These reports are not related to the controller state and must be dropped to avoid generating false input events. Link: http://www.spinics.net/lists/linux-bluetooth/msg63028.htmlSigned-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.com>
-
- 13 7月, 2015 1 次提交
-
-
由 Simon Wood 提交于
Patch HID report descriptor to add joystick axis for the L1 button (previously missing). Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.com>
-
- 18 6月, 2015 3 次提交
-
-
由 Simon Wood 提交于
Patch report descriptor to remove unused and ramdomly changing axis. Original report descriptor (via BT) was as follows: 00000000 05 01 09 04 a1 01 a1 02 85 01 75 08 95 01 15 00 |..........u.....| 00000010 26 ff 00 81 03 75 01 95 13 15 00 25 01 35 00 45 |&....u.....%.5.E| 00000020 01 05 09 19 01 29 13 81 02 75 01 95 0d 06 00 ff |.....)...u......| 00000030 81 03 15 00 26 ff 00 05 01 09 01 a1 00 75 08 95 |....&........u..| 00000040 04 35 00 46 ff 00 09 30 09 31 09 32 09 35 81 02 |.5.F...0.1.2.5..| 00000050 c0 05 01 75 08 95 27 09 01 81 02 75 08 95 30 09 |...u..'....u..0.| 00000060 01 91 02 75 08 95 30 09 01 b1 02 c0 a1 02 85 02 |...u..0.........| 00000070 75 08 95 30 09 01 b1 02 c0 a1 02 85 ee 75 08 95 |u..0.........u..| 00000080 30 09 01 b1 02 c0 a1 02 85 ef 75 08 95 30 09 01 |0.........u..0..| 00000090 b1 02 c0 c0 00 |.....| 00000095 Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Simon Wood 提交于
Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Simon Wood 提交于
Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 12 6月, 2015 3 次提交
-
-
由 Simon Wood 提交于
Fix the report descriptor so that the buttons and trigger are correctly reported. The format of the input report is described here: https://github.com/nitsch/moveonpc/wiki/Input-report The Accelerometers and Gyros (1st frame only) are also reported as axis, but the Magnetometers are NOT as 'fixing' their byte order would break user-space drivers such as PSMoveAPI. It is hoped to resolve this at a future time. Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Simon Wood 提交于
The LED and Rumble control only function via BT if the full output report is sent. The large report still functions via USB. Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Simon Wood 提交于
Add support for the battery charge level and state to be read via BT. This is not support via USB as there is no know way to get the device sending 'input' reports over USB. Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-