- 07 5月, 2015 4 次提交
-
-
由 Frank Praznik 提交于
Correct a spelling mistake in the Sixaxis HID descriptor comment. Add an explanation as to why the Sixaxis has so many analog axes and why some of them are seen as multi-touch axes. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Directly set the initial LED states in the device state struct instead of copying them from a temporary array. This allows for the removal of a redundant "x = x" copy loop in sony_set_leds() that was taking place any time an LED was updated. It also allows for the simplifying of the parameters in functions dealing with LED initialization and updates since only a pointer to the sony_sc struct is needed now. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Add a fixed-up HID descriptor for the Sony motion controller and enable controls for the LED light as well as force-feedback. The LED is multi-colored (red, green, blue). The motion controller has a single rumble motor so the higher of the left and right values is used to set the speed. Signed-off-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
sony_allocate_output_report() was being called before sony_set_device_id() which meant that an unallocated ida value was was freed if the output report allocation failed and the probe function jumped to err_stop. Do the device ID allocation before the output report allocation to avoid freeing an unallocated value in case of a failure. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 14 3月, 2015 2 次提交
-
-
由 Krzysztof Kozlowski 提交于
Change the ownership of power_supply structure from each driver implementing the class to the power supply core. The patch changes power_supply_register() function thus all drivers implementing power supply class are adjusted. Each driver provides the implementation of power supply. However it should not be the owner of power supply class instance because it is exposed by core to other subsystems with power_supply_get_by_name(). These other subsystems have no knowledge when the driver will unregister the power supply. This leads to several issues when driver is unbound - mostly because user of power supply accesses freed memory. Instead let the core own the instance of struct 'power_supply'. Other users of this power supply will still access valid memory because it will be freed when device reference count reaches 0. Currently this means "it will leak" but power_supply_put() call in next patches will solve it. This solves invalid memory references in following race condition scenario: Thread 1: charger manager Thread 2: power supply driver, used by charger manager THREAD 1 (charger manager) THREAD 2 (power supply driver) ========================== ============================== psy = power_supply_get_by_name() Driver unbind, .remove power_supply_unregister() Device fully removed psy->get_property() The 'get_property' call is executed in invalid context because the driver was unbound and struct 'power_supply' memory was freed. This could be observed easily with charger manager driver (here compiled with max17040 fuel gauge): $ cat /sys/devices/virtual/power_supply/cm-battery/capacity & $ echo "1-0036" > /sys/bus/i2c/drivers/max17040/unbind [ 55.725123] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 55.732584] pgd = d98d4000 [ 55.734060] [00000000] *pgd=5afa2831, *pte=00000000, *ppte=00000000 [ 55.740318] Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM [ 55.746210] Modules linked in: [ 55.749259] CPU: 1 PID: 2936 Comm: cat Tainted: G W 3.19.0-rc1-next-20141226-00048-gf79f475f3c44-dirty #1496 [ 55.760190] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 55.766270] task: d9b76f00 ti: daf54000 task.ti: daf54000 [ 55.771647] PC is at 0x0 [ 55.774182] LR is at charger_get_property+0x2f4/0x36c [ 55.779201] pc : [<00000000>] lr : [<c034b0b4>] psr: 60000013 [ 55.779201] sp : daf55e90 ip : 00000003 fp : 00000000 [ 55.790657] r10: 00000000 r9 : c06e2878 r8 : d9b26c68 [ 55.795865] r7 : dad81610 r6 : daec7410 r5 : daf55ebc r4 : 00000000 [ 55.802367] r3 : 00000000 r2 : daf55ebc r1 : 0000002a r0 : d9b26c68 [ 55.808879] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 55.815994] Control: 10c5387d Table: 598d406a DAC: 00000015 [ 55.821723] Process cat (pid: 2936, stack limit = 0xdaf54210) [ 55.827451] Stack: (0xdaf55e90 to 0xdaf56000) [ 55.831795] 5e80: 60000013 c01459c4 0000002a c06f8ef8 [ 55.839956] 5ea0: db651000 c06f8ef8 daebac00 c04cb668 daebac08 c0346864 00000000 c01459c4 [ 55.848115] 5ec0: d99eaa80 c06f8ef8 00000fff 00001000 db651000 c027f25c c027f240 d99eaa80 [ 55.856274] 5ee0: d9a06c00 c0146218 daf55f18 00001000 d99eaa80 db4c18c0 00000001 00000001 [ 55.864468] 5f00: daf55f80 c0144c78 c0144c54 c0107f90 00015000 d99eaab0 00000000 00000000 [ 55.872603] 5f20: 000051c7 00000000 db4c18c0 c04a9370 00015000 00001000 daf55f80 00001000 [ 55.880763] 5f40: daf54000 00015000 00000000 c00e53dc db4c18c0 c00e548c 0000000d 00008124 [ 55.888937] 5f60: 00000001 00000000 00000000 db4c18c0 db4c18c0 00001000 00015000 c00e5550 [ 55.897099] 5f80: 00000000 00000000 00001000 00001000 00015000 00000003 00000003 c000f364 [ 55.905239] 5fa0: 00000000 c000f1a0 00001000 00015000 00000003 00015000 00001000 0001333c [ 55.913399] 5fc0: 00001000 00015000 00000003 00000003 00000002 00000000 00000000 00000000 [ 55.921560] 5fe0: 7fffe000 be999850 0000a225 b6f3c19c 60000010 00000003 00000000 00000000 [ 55.929744] [<c034b0b4>] (charger_get_property) from [<c0346864>] (power_supply_show_property+0x48/0x20c) [ 55.939286] [<c0346864>] (power_supply_show_property) from [<c027f25c>] (dev_attr_show+0x1c/0x48) [ 55.948130] [<c027f25c>] (dev_attr_show) from [<c0146218>] (sysfs_kf_seq_show+0x84/0x104) [ 55.956298] [<c0146218>] (sysfs_kf_seq_show) from [<c0144c78>] (kernfs_seq_show+0x24/0x28) [ 55.964536] [<c0144c78>] (kernfs_seq_show) from [<c0107f90>] (seq_read+0x1b0/0x484) [ 55.972172] [<c0107f90>] (seq_read) from [<c00e53dc>] (__vfs_read+0x18/0x4c) [ 55.979188] [<c00e53dc>] (__vfs_read) from [<c00e548c>] (vfs_read+0x7c/0x100) [ 55.986304] [<c00e548c>] (vfs_read) from [<c00e5550>] (SyS_read+0x40/0x8c) [ 55.993164] [<c00e5550>] (SyS_read) from [<c000f1a0>] (ret_fast_syscall+0x0/0x48) [ 56.000626] Code: bad PC value [ 56.011652] ---[ end trace 7b64343fbdae8ef1 ]--- Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> [for the nvec part] Reviewed-by: NMarc Dietrich <marvin24@gmx.de> [for compal-laptop.c] Acked-by: NDarren Hart <dvhart@linux.intel.com> [for the mfd part] Acked-by: NLee Jones <lee.jones@linaro.org> [for the hid part] Acked-by: NJiri Kosina <jkosina@suse.cz> [for the acpi part] Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Add new structure 'power_supply_config' for holding run-time initialization data like of_node, supplies and private driver data. The power_supply_register() function is changed so all power supply drivers need updating. When registering the power supply this new 'power_supply_config' should be used instead of directly initializing 'struct power_supply'. This allows changing the ownership of power_supply structure from driver to the power supply core in next patches. When a driver does not use of_node or supplies then it should use NULL as config. If driver uses of_node or supplies then it should allocate config on stack and initialize it with proper values. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: NPavel Machek <pavel@ucw.cz> [for the nvec part] Reviewed-by: NMarc Dietrich <marvin24@gmx.de> [for drivers/platform/x86/compal-laptop.c] Reviewed-by: NDarren Hart <dvhart@linux.intel.com> [for drivers/hid/*] Reviewed-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 23 2月, 2015 2 次提交
-
-
由 Frank Praznik 提交于
Per-controller spinlock needs to be properly initialized during device probe. [jkosina@suse.cz: massage changelog] [jkosina@suse.cz: drop hunk that has already been applied by previous patch] Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
sony_dev_list_lock spinlock (which was introduced in d2d782fc ("HID: sony: Prevent duplicate controller connections") is not being initialized properly. Fix that. Reported-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 2月, 2015 5 次提交
-
-
由 Antonio Ospite 提交于
Don't mix declaration and allocation, remove some useless newlines between calling a function and checking its return value. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
Use the same type declared in the prototypes of functions that are going to accept the buffer as parameter. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
Remove the magic numbers used in sixaxis_set_operational_usb(): - use the already defined SIXAXIS_REPORT_0xF2_SIZE; - define and use SIXAXIS_REPORT_0xF5_SIZE; - set the dummy buffer size to accommodate any report that is going to be requested. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
Sixaxis devices accept feature report 0xf2 when size is >= 17, not 18. Use the minimum accepted size. The change is mainly for documentation purposes, the code worked fine even before this change. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
ida_destroy() must be called _after_ all the devices have been unregistered; otherwise, when calling "rmmod hid_sony" with devices still plugged in, the following warning would show up because of calls to ida_simple_remove() on a destroyed ID allocator: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5509 at lib/idr.c:1052 ida_simple_remove+0x26/0x50() ida_remove called for id=0 which is not allocated. Modules linked in: ... CPU: 0 PID: 5509 Comm: rmmod Not tainted 3.19.0-rc6-ao2 #35 Hardware name: System manufacturer System Product Name/M2N-MX SE, BIOS 0501 03/20/2008 0000000000000000 ffffffff8176320d ffffffff815b3a88 ffff880036f7fdd8 ffffffff8106ce01 0000000000000000 ffffffffa07658e0 0000000000000246 ffff88005077d8b8 ffff88005077d8d0 ffffffff8106ce7a ffffffff81763260 Call Trace: [<ffffffff815b3a88>] ? dump_stack+0x40/0x50 [<ffffffff8106ce01>] ? warn_slowpath_common+0x81/0xb0 [<ffffffff8106ce7a>] ? warn_slowpath_fmt+0x4a/0x50 [<ffffffff812ccb86>] ? ida_simple_remove+0x26/0x50 [<ffffffffa0762dc8>] ? sony_remove+0x58/0xe0 [hid_sony] [<ffffffffa00fff15>] ? hid_device_remove+0x65/0xd0 [hid] [<ffffffff8140425e>] ? __device_release_driver+0x7e/0x100 [<ffffffff81404c70>] ? driver_detach+0xa0/0xb0 [<ffffffff81403ee5>] ? bus_remove_driver+0x55/0xe0 [<ffffffffa01000ff>] ? hid_unregister_driver+0x2f/0xa0 [hid] [<ffffffff810e45bf>] ? SyS_delete_module+0x1bf/0x270 [<ffffffff81014089>] ? do_notify_resume+0x69/0xa0 [<ffffffff815b952d>] ? system_call_fastpath+0x16/0x1b ---[ end trace bc794b3d22c30ede ]--- Signed-off-by: NAntonio Ospite <ao2@ao2.it> Acked-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 2月, 2015 1 次提交
-
-
由 Lauri Kasanen 提交于
Without this, my "Gasia Co.,Ltd PS(R) Gamepad" would not send any events. Now everything works including the leds. Based on work by Andrew Haines and Antonio Ospite. cc: Antonio Ospite <ao2@ao2.it> cc: Andrew Haines <AndrewD207@aol.com> Signed-off-by: NLauri Kasanen <cand@gmx.com> Reviewed-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 11月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
Add vid/pid for the SMK branded third-party PS3 Bluetooth remote and enable support in the hid-sony driver. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 11月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
Replace stack buffers with kernel allocated buffers for sending and receiving HID reports to prevent issues with DMA transfers on certain hardware. Output report buffers are allocated at initialization time to avoid excessive calls to kmalloc and kfree. Link: https://bugzilla.kernel.org/show_bug.cgi?id=87991Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Reviewed-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 25 9月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
The DualShock 4 touchpad has been measured to have a resolution of 44.86 dots/mm which equates to 1920x942. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 22 9月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 15 9月, 2014 2 次提交
-
-
由 Frank Praznik 提交于
Update the file header and correct an outdated comment block. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 01 9月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
Bit 3 in byte 31 of the Sixaxis report indicates whether the battery is charging or not charging as opposed to whether or not the cable is plugged in. As a result, when connected via USB and fully charged, the power_supply status is wrongly reported as 'Discharging' instead of 'Full'. Use the battery level value to set the cable state so that the power status is reported correctly as that seems to be the only reliable way to determine the cable status on the Sixaxis. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 30 7月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
Previously only the first element of the array was initialized to 1 leading to potential incorrect max brightness values for the LEDs on the Dualshock 3 and buzzer controllers. Use a designated initializer to initialize the whole array to the correct value. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 26 6月, 2014 4 次提交
-
-
由 Antonio Ospite 提交于
Remove an old redundant comment before sony_report_fixup(), it must have been a leftover from the first version of the driver: sony_report_fixup() now handles all the supported devices, not only the Sony Vaio VGX. The comment is also redundant as the same information provided by it is also present in the body of the function. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
Reformat sixaxis_rdesc to reflect its HID structure, and comment each field. This will make it easier to validate changes to the descriptor in the future. No functional changes are introduced, the descriptor is exactly the same as before byte by byte. The heavy lifting has been done with the help of hidrd-convert: https://github.com/DIGImend/hidrdSigned-off-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
Simplify the logic of overriding the Sixaxis HID descriptor, this will make it easier to amend the descriptor in future commits. The current code does this: if (original sixaxis via USB or BT) fixup only a part of the descriptor else if (sixaxis compatible controller) override the _whole_ descriptor but the end result is exactly the same, except for the trailing zero in the case of original BT controllers. So let's just regularize the process, and always override the HID descriptor. Always overriding the descriptor changes the current semantic a little bit, before this change the BT descriptor still had the trailing zero byte, while now it is exactly the same as the descriptor of the controller via USB, but that does not affect proper operation of the device. Note that overriding the whole descriptor for original devices is not strictly necessary for now, but it simplifies the code and in the future the report descriptor will be patched further and keys will be remapped, so it's handy to have only one place to patch. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Antonio Ospite 提交于
Instead of checking for SIXAXIS_CONTROLLER_USB and SIXAXIS_CONTROLLER_BT separately, a check on SIXAXIS_CONTROLLER can be used when setting connect_mask. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 25 4月, 2014 7 次提交
-
-
由 Simon Wood 提交于
Without this patch the 3rd party INTEC (PS3) controller will blink all leds when user turns them off, it appears to require an extra flag set. Signed-off-by: NSimon Wood <simon@mungewell.org> Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Add support for setting the blink rate of the LEDs. The Sixaxis allows control over each individual LED, but the Dualshock 4 only has one global control for controlling the hardware blink rate so individual colors will fall back to software timers. Setting the brightness cancels the blinking as per the LED class specifications. The Sixaxis and Dualshock 4 controllers accept delays in decisecond increments from 0 to 255 (2550 milliseconds). The value at index 1 of the DualShock 4 USB output report must be 0xFF or the light bar won't blink. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Add an IDA id allocator to assign unique, sequential device ids to Sixaxis and DualShock 4 controllers. Use the device ID to initialize the Sixaxis and DualShock 4 controller LEDs to default values. The number or color of the controller is set relative to other connected Sony controllers. Set the LED class brightness values to the initial values and add the new led to the array before calling led_classdev_register so that the correct brightness value shows up in the LED sysfs entry. Use explicit module init and exit functions since the IDA allocator must be manually destroyed when the module is unloaded. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Use the controller Bluetooth MAC address as the unique identifier in the battery name string instead of the atomic integer that was used before. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Convert all of the local initialization and shutdown functions to take a parameter type of struct sony_sc* instead of using a mix of struct sony_sc* and struct hid_device*. Allows for the removal of some calls to hid_get_drvdata(). Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Use a struct for the Sixaxis output report that uses named members to set the report fields. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
Use inliners to make sure that the work queue initialization flag is always checked and set correctly when initializing or cancelling the work queue. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 03 4月, 2014 1 次提交
-
-
由 Frank Praznik 提交于
Remove redundant cancel_work_sync() call caused by mismerge. Signed-off-by: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 02 4月, 2014 3 次提交
-
-
由 Jiri Kosina 提交于
Fix unfortunate mismerge between the fixes and sony branch causing code duplication and unterminated basic block. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Frank Praznik 提交于
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: NFrank Praznik <frank.praznik@oh.rr.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 14 3月, 2014 1 次提交
-
-
由 Benjamin Tissoires 提交于
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 3a75b249 (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: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: NAntonio Ospite <ao2@ao2.it> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 25 2月, 2014 2 次提交
-
-
由 Frank Praznik 提交于
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: 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 提交于
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>
-