- 25 2月, 2014 3 次提交
-
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Convert multi-line comments to comply with the kernel coding style. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 2月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 2月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 2月, 2014 8 次提交
-
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Add Dualshock 4 battery and touchpad parsing for Bluetooth reports. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Switch to the low-level transport driver functions. sony_set_output_report is removed since it is no longer used. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
Add a helper to access hdev->hid_output_raw_report(). To convert the drivers, use the following snippets: for i in drivers/hid/*.c do sed -i.bak "s/[^ \t]*->hid_output_raw_report(/hid_output_raw_report(/g" $i done Then manually fix for checkpatch.pl Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
dev->hid_get_raw_report(X) and hid_hw_raw_request(X, HID_REQ_GET_REPORT) are strictly equivalent. Switch the hid subsystem to the hid_hw notation and remove the field .hid_get_raw_report in struct hid_device. Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 06 2月, 2014 1 次提交
-
-
由 Simon Wood 提交于
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: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 29 1月, 2014 2 次提交
-
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Add battery status reporting for the Sixaxis and Dualshock 4 controllers. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 21 1月, 2014 2 次提交
-
-
由 Frank Praznik 提交于
Use the naming scheme 'devicename:colour' for the Dualshock 4 LED lightbar controls as specified in Documentation/leds/leds-class.txt Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Add annotated HID descriptor for the Dualshock 4. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 1月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
Retrieve and cache the output report for the Dualshock 4 in sony_probe() instead of repeatedly walking the report list in the worker function. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 1月, 2014 7 次提交
-
-
由 Frank Praznik 提交于
Use a modified HID descriptor for the Dualshock 4 to assign the gyroscope sensors and accelerometers to axes. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Fix cosmetic spacing in the device definitions. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Use regular HID output reports instead of raw reports in the dualshock4_state_worker function. (Thanks Simon Mungewell) Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Use separate identifiers for Dualshock 4 controllers connected via USB and Bluetooth. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Rename sony_state_worker to sixaxis_state_worker since the function is now sixaxis specific. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Add LED lightbar controls for the Dualshock 4. The Dualshock 4 light bar has 3 separate RGB LEDs that can range in brightness from 0 to 255 so a full byte is now needed to store each LED's state Changed the module to support an arbitrary number of LEDs instead of being hardcoded to 4. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Adds the Dualshock 4 to the HID device list and enables force-feedback. Adds a Dualshock 4 specific worker function since the Dualshock 4 needs a different report than the Sixaxis. The right motor in the Dualshock 4 is variable so the full rumble value is now passed to the worker function and clamped there if necessary. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 02 1月, 2014 1 次提交
-
-
由 Julia Lawall 提交于
Currently the return variable ret is always 0. Set it to other values in error cases, as used in the direct return. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 11月, 2013 5 次提交
-
-
由 Sven Eckelmann 提交于
The PS3 Sixaxis controller has 4 LEDs which can be controlled using the same command as the rumble functionality. It seems not to be possible to only change the LED without modifying the rumble motor state. Thus both have to be stored on the host and retransmitted when either the LED or rumble state is changed. Third party controllers may not support to disable all LEDs at once. These controllers automatically switch to blinking of all LEDs when no LED is active anymore. Signed-off-by: NSven Eckelmann <sven@narfation.org> Tested-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Sven Eckelmann 提交于
It is not necessary to keep the LED information in an extra struct which is only used by the Buzz device. It can also be used by other devices. Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Sven Eckelmann 提交于
More controllers managed by the hid-sony module have 4 LEDs. These can share most of the functionality provided by the buzz functions. Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Sven Eckelmann 提交于
Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Sven Eckelmann 提交于
The commands used to modify the rumble motor state also modifies the LEDs at the same time. The functionality used to modify this state in the driver has to be shared between the rumble and LED part. It is therefore better to replace the "rumble" part of the names with "state". Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 11月, 2013 1 次提交
-
-
由 Sven Eckelmann 提交于
The ff_memless has a timer running which gets run in an atomic context and calls the play_effect callback. The callback function for sony uses the hid_output_raw_report (overwritten by sixaxis_usb_output_raw_report) function to handle differences in the control message format. It is not safe for an atomic context because it may sleep later in usb_start_wait_urb. This "scheduling while atomic" can cause the system to lock up. A workaround is to make the force feedback state update using work_queues and use the play_effect function only to enqueue the work item. Reported-by: NSimon Wood <simon@mungewell.org> Reported-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 11 11月, 2013 1 次提交
-
-
由 Sven Eckelmann 提交于
Sony Dualshock 3 controllers have two motors which can be used to provide simple force feedback rumble effects. The right motor is can be used to create a weak rumble effect but does not allow to set the force. The left motor is used to create a strong rumble effect with adjustable intensity. The state of both motors can be changed using HID_OUTPUT_REPORT packets and have no timing information. FF memless is used to keep track of the timing and the sony driver just generates the necessary URBs. Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 24 9月, 2013 1 次提交
-
-
由 Benjamin Tissoires 提交于
The usb packets are exactly the same, but it makes it a little bit more independent of the transport layer. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 9月, 2013 1 次提交
-
-
由 Kees Cook 提交于
This driver must validate the availability of the HID output report and its size before it can write LED states via buzz_set_leds(). This stops a heap overflow that is possible if a device provides a malicious HID output report: [ 108.171280] usb 1-1: New USB device found, idVendor=054c, idProduct=0002 ... [ 117.507877] BUG kmalloc-192 (Not tainted): Redzone overwritten CVE-2013-2890 Signed-off-by: NKees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org #3.11 Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 31 7月, 2013 1 次提交
-
-
由 Benjamin Tissoires 提交于
It is safe to use devres allocation within the hid subsystem: - the devres release is called _after_ the call to .remove(), meaning that no freed pointers will exists while removing the device - if a .probe() fails, devres releases all the allocated ressources before going to the next driver: there will not be ghost ressources attached to a hid device if several drivers are probed. Given that, we can clean up a little some of the HID drivers. These ones are trivial: - there is only one kzalloc in the driver - the .remove() callback contains only one kfree on top of hid_hw_stop() - the error path in the probe is easy enough to be manually checked Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 24 7月, 2013 1 次提交
-
-
由 Benjamin Tissoires 提交于
Commit f04d5140 (HID: driver for PS2/3 Buzz controllers) introduced an input_mapping() callback, but set the return value to -1 to all devices except the Buzz controllers. The result of this is that the Sixaxis input device is not populated, making it useless. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 6月, 2013 1 次提交
-
-
由 Jiri Kosina 提交于
Let's follow the structure we are trying to keep for most of the specific HID drivers, and let the separation follow the producing vendor. Merge functionality provided by ps3remote driver into hid-sony. Tested-by: NDavid Dillow <dave@thedillows.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 28 5月, 2013 1 次提交
-
-
由 Jiri Kosina 提交于
The newly added support for Buzz controller - introduced Kconfig selection of LEDS_CLASS - introduced conditional preprocessor checking for CONFIG_LEDS_CLASS This has multiple problems -- namely select doesn't work transitively, so it shouldn't be used. On the other hand the code assumed that LEDS_CLASS is enabled in some places, but not everywhere. Put LEDS_CLASS as a Kconfig dependency for hid-sony and remove all the CONFIG_LEDS_CLASS conditionals from hid-sony. Reported-by: fengguang.wu@intel.com Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-