<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hid/hid-sony.c, branch v4.0.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>HID: sony: fix uninitialized per-controller spinlock</title>
<updated>2015-02-23T12:01:15+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2015-02-23T01:42:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b94993f6fb3452628bb4678ea86df33ffbfdde8d'/>
<id>b94993f6fb3452628bb4678ea86df33ffbfdde8d</id>
<content type='text'>
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: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: initialize sony_dev_list_lock properly</title>
<updated>2015-02-23T10:15:44+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2015-02-23T10:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b402c929d21a18e9a228d4ad6f0a076577cd63c'/>
<id>8b402c929d21a18e9a228d4ad6f0a076577cd63c</id>
<content type='text'>
sony_dev_list_lock spinlock (which was introduced in d2d782fccee ("HID: sony:
Prevent duplicate controller connections") is not being initialized properly.
Fix that.

Reported-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sony_dev_list_lock spinlock (which was introduced in d2d782fccee ("HID: sony:
Prevent duplicate controller connections") is not being initialized properly.
Fix that.

Reported-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Fix a WARNING shown when rmmod-ing the driver</title>
<updated>2015-02-18T20:18:22+00:00</updated>
<author>
<name>Antonio Ospite</name>
<email>ao2@ao2.it</email>
</author>
<published>2015-02-16T21:58:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6c40065fc107cae29ab965f162406fcfd1525f1d'/>
<id>6c40065fc107cae29ab965f162406fcfd1525f1d</id>
<content type='text'>
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:
 [&lt;ffffffff815b3a88&gt;] ? dump_stack+0x40/0x50
 [&lt;ffffffff8106ce01&gt;] ? warn_slowpath_common+0x81/0xb0
 [&lt;ffffffff8106ce7a&gt;] ? warn_slowpath_fmt+0x4a/0x50
 [&lt;ffffffff812ccb86&gt;] ? ida_simple_remove+0x26/0x50
 [&lt;ffffffffa0762dc8&gt;] ? sony_remove+0x58/0xe0 [hid_sony]
 [&lt;ffffffffa00fff15&gt;] ? hid_device_remove+0x65/0xd0 [hid]
 [&lt;ffffffff8140425e&gt;] ? __device_release_driver+0x7e/0x100
 [&lt;ffffffff81404c70&gt;] ? driver_detach+0xa0/0xb0
 [&lt;ffffffff81403ee5&gt;] ? bus_remove_driver+0x55/0xe0
 [&lt;ffffffffa01000ff&gt;] ? hid_unregister_driver+0x2f/0xa0 [hid]
 [&lt;ffffffff810e45bf&gt;] ? SyS_delete_module+0x1bf/0x270
 [&lt;ffffffff81014089&gt;] ? do_notify_resume+0x69/0xa0
 [&lt;ffffffff815b952d&gt;] ? system_call_fastpath+0x16/0x1b
---[ end trace bc794b3d22c30ede ]---

Signed-off-by: Antonio Ospite &lt;ao2@ao2.it&gt;
Acked-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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:
 [&lt;ffffffff815b3a88&gt;] ? dump_stack+0x40/0x50
 [&lt;ffffffff8106ce01&gt;] ? warn_slowpath_common+0x81/0xb0
 [&lt;ffffffff8106ce7a&gt;] ? warn_slowpath_fmt+0x4a/0x50
 [&lt;ffffffff812ccb86&gt;] ? ida_simple_remove+0x26/0x50
 [&lt;ffffffffa0762dc8&gt;] ? sony_remove+0x58/0xe0 [hid_sony]
 [&lt;ffffffffa00fff15&gt;] ? hid_device_remove+0x65/0xd0 [hid]
 [&lt;ffffffff8140425e&gt;] ? __device_release_driver+0x7e/0x100
 [&lt;ffffffff81404c70&gt;] ? driver_detach+0xa0/0xb0
 [&lt;ffffffff81403ee5&gt;] ? bus_remove_driver+0x55/0xe0
 [&lt;ffffffffa01000ff&gt;] ? hid_unregister_driver+0x2f/0xa0 [hid]
 [&lt;ffffffff810e45bf&gt;] ? SyS_delete_module+0x1bf/0x270
 [&lt;ffffffff81014089&gt;] ? do_notify_resume+0x69/0xa0
 [&lt;ffffffff815b952d&gt;] ? system_call_fastpath+0x16/0x1b
---[ end trace bc794b3d22c30ede ]---

Signed-off-by: Antonio Ospite &lt;ao2@ao2.it&gt;
Acked-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Add support for the third-party SMK PS3 Bluetooth Remote</title>
<updated>2014-11-20T14:05:27+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2014-11-12T19:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=68a49e51a4a9c500d950f893f1758c5ac13b7c8b'/>
<id>68a49e51a4a9c500d950f893f1758c5ac13b7c8b</id>
<content type='text'>
Add vid/pid for the SMK branded third-party PS3 Bluetooth remote and enable
support in the hid-sony driver.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add vid/pid for the SMK branded third-party PS3 Bluetooth remote and enable
support in the hid-sony driver.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Use kernel allocated buffers for HID reports</title>
<updated>2014-11-19T09:23:54+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2014-11-12T19:10:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9b2b5c9a790743ccb2516f1a86671d5df9c6c5cd'/>
<id>9b2b5c9a790743ccb2516f1a86671d5df9c6c5cd</id>
<content type='text'>
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=87991
Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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=87991
Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Update the DualShock 4 touchpad resolution</title>
<updated>2014-09-25T09:23:26+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2014-09-24T13:38:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=981c5b4a3b372402dc3aeae3a7a3eb687df44067'/>
<id>981c5b4a3b372402dc3aeae3a7a3eb687df44067</id>
<content type='text'>
The DualShock 4 touchpad has been measured to have a resolution of
44.86 dots/mm which equates to 1920x942.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DualShock 4 touchpad has been measured to have a resolution of
44.86 dots/mm which equates to 1920x942.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Set touchpad bits in the input_configured callback</title>
<updated>2014-09-22T14:04:21+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2014-09-19T01:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ce8efc3b563070c2aa2e0455b992256c98e03547'/>
<id>ce8efc3b563070c2aa2e0455b992256c98e03547</id>
<content type='text'>
Set the DualShock4 touchpad bits in the input_configured callback
so that they are registered properly for any input devices created
during hid_hw_start.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set the DualShock4 touchpad bits in the input_configured callback
so that they are registered properly for any input devices created
during hid_hw_start.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Update file header and correct comments</title>
<updated>2014-09-15T11:34:53+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2014-09-14T15:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=077147a3055efbaafd624aa297f4284d0996b3f2'/>
<id>077147a3055efbaafd624aa297f4284d0996b3f2</id>
<content type='text'>
Update the file header and correct an outdated comment block.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the file header and correct an outdated comment block.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Corrections for the DualShock 4 HID descriptor</title>
<updated>2014-09-15T11:34:53+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2014-09-14T15:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fb291cbd3f9f7bd5873f112a6924b650440779c6'/>
<id>fb291cbd3f9f7bd5873f112a6924b650440779c6</id>
<content type='text'>
Fix a few minor issues in the HID descriptor:
 - A 6 bit entry had a logical maximum of 255 when the largest it can be is 63.
 - A logical max value was incorrectly being set to -1 instead of 255.
 - Set the min/max of the gyroscopes to -8192/8191 as that is the range of
   values which represent the true controller orientation.  Any values beyond
   those extents are just noise.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a few minor issues in the HID descriptor:
 - A 6 bit entry had a logical maximum of 255 when the largest it can be is 63.
 - A logical max value was incorrectly being set to -1 instead of 255.
 - Set the min/max of the gyroscopes to -8192/8191 as that is the range of
   values which represent the true controller orientation.  Any values beyond
   those extents are just noise.

Signed-off-by: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sony: Set the Sixaxis cable state correctly</title>
<updated>2014-09-01T09:20:52+00:00</updated>
<author>
<name>Frank Praznik</name>
<email>frank.praznik@oh.rr.com</email>
</author>
<published>2014-08-29T17:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9fddd74a238f03c322b373662803bd1ce80338da'/>
<id>9fddd74a238f03c322b373662803bd1ce80338da</id>
<content type='text'>
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: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Frank Praznik &lt;frank.praznik@oh.rr.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
