<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/hid/hid-input.c, branch v4.4.183</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.183</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.183'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-05-16T17:45:05Z</updated>
<entry>
<title>HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys</title>
<updated>2019-05-16T17:45:05Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2019-01-18T22:05:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3007ae4bbf26d56c00daac692a6aba97ca8c31fc'/>
<id>urn:sha1:3007ae4bbf26d56c00daac692a6aba97ca8c31fc</id>
<content type='text'>
[ Upstream commit 7975a1d6a7afeb3eb61c971a153d24dd8fa032f3 ]

According to HUTRR73 usages 0x79, 0x7a and 0x7c from the consumer page
correspond to Brightness Up/Down/Toggle keys, so let's add the mappings.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: input: add mapping for Expose/Overview key</title>
<updated>2019-05-16T17:45:05Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2019-01-18T21:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c15b4f9f46998d347397973e9db5810b842bbed8'/>
<id>urn:sha1:c15b4f9f46998d347397973e9db5810b842bbed8</id>
<content type='text'>
[ Upstream commit 96dd86871e1fffbc39e4fa61c9c75ec54ee9af0f ]

According to HUTRR77 usage 0x29f from the consumer page is reserved for
the Desktop application to present all running user’s application windows.
Linux defines KEY_SCALE to request Compiz Scale (Expose) mode, so let's
add the mapping.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: Fix hid_report_len usage</title>
<updated>2018-04-24T07:32:07Z</updated>
<author>
<name>Aaron Ma</name>
<email>aaron.ma@canonical.com</email>
</author>
<published>2018-02-03T15:57:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8d7610e122885386c4004dd0b5aca3e8928a1e50'/>
<id>urn:sha1:8d7610e122885386c4004dd0b5aca3e8928a1e50</id>
<content type='text'>
commit 3064a03b94e60388f0955fcc29f3e8a978d28f75 upstream.

Follow the change of return type u32 of hid_report_len,
fix all the types of variables those get the return value of
hid_report_len to u32, and all other code already uses u32.

Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma &lt;aaron.ma@canonical.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: clamp input to logical range if no null state</title>
<updated>2018-03-22T08:23:20Z</updated>
<author>
<name>Tomasz Kramkowski</name>
<email>tk@the-tk.com</email>
</author>
<published>2017-03-14T13:29:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=aa4b0ac7c16942717370b704869a72c383b0508a'/>
<id>urn:sha1:aa4b0ac7c16942717370b704869a72c383b0508a</id>
<content type='text'>
[ Upstream commit c3883fe06488a483658ba5d849b70e49bee15e7c ]

This patch fixes an issue in drivers/hid/hid-input.c where values
outside of the logical range are not clamped when "null state" bit of
the input control is not set.

This was discussed on the lists [1] and this change stems from the fact
due to the ambiguity of the HID specification it might be appropriate to
follow Microsoft's own interpretation of the specification. As noted in
Microsoft's documentation [2] in the section titled "Required HID usages
for digitizers" it is noted that values reported outside the logical
range "will be considered as invalid data and the value will be changed
to the nearest boundary value (logical min/max)."

This patch fixes an issue where the (1292:4745) Innomedia INNEX
GENESIS/ATARI reports out of range values for its X and Y axis of the
DPad which, due to the null state bit being unset, are forwarded to
userspace as is. Now these values will get clamped to the logical range
before being forwarded to userspace. This device was also used to test
this patch.

This patch expands on commit 3f3752705dbd ("HID: reject input outside
logical range only if null state is set").

[1]: http://lkml.kernel.org/r/20170307131036.GA853@gaia.local
[2]: https://msdn.microsoft.com/en-us/library/windows/hardware/dn672278(v=vs.85).asp

Signed-off-by: Tomasz Kramkowski &lt;tk@the-tk.com&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: reject input outside logical range only if null state is set</title>
<updated>2018-03-22T08:23:19Z</updated>
<author>
<name>Valtteri Heikkilä</name>
<email>rnd@nic.fi</email>
</author>
<published>2017-02-14T23:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9b7940be33211e6f26ca129b8aaf53ea6e0f176b'/>
<id>urn:sha1:9b7940be33211e6f26ca129b8aaf53ea6e0f176b</id>
<content type='text'>
[ Upstream commit 3f3752705dbd50b66b66ad7b4d54fe33d2f746ed ]

This patch fixes an issue in drivers/hid/hid-input.c where USB HID
control null state flag is not checked upon rejecting inputs outside
logical minimum-maximum range. The check should be made according to USB
HID specification 1.11, section 6.2.2.5, p.31. The fix will resolve
issues with some game controllers, such as:
https://bugzilla.kernel.org/show_bug.cgi?id=68621

[tk@the-tk.com: shortened and fixed spelling in commit message]
Signed-off-by: Valtteri Heikkilä &lt;rnd@nic.fi&gt;
Signed-off-by: Tomasz Kramkowski &lt;tk@the-tk.com&gt;
Acked-By: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: hid-input: allow input_configured callback return errors</title>
<updated>2015-11-05T17:51:50Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2015-09-29T22:52:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9154301a47b33bdc273d8254c407792524367558'/>
<id>urn:sha1:9154301a47b33bdc273d8254c407792524367558</id>
<content type='text'>
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: Jaikumar Ganesh &lt;jaikumarg@android.com&gt;
Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Acked-by: Nikolai Kondrashov &lt;Nikolai.Kondrashov@redhat.com&gt;
Acked-by: Andrew Duggan &lt;aduggan@synaptics.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branches 'for-4.2/upstream-fixes-devm-fixed' and 'for-4.3/upstream' into for-linus</title>
<updated>2015-09-01T13:23:13Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2015-09-01T13:23:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3e097d1271ecdff2f251a54ddfc5eaa1f9821e96'/>
<id>urn:sha1:3e097d1271ecdff2f251a54ddfc5eaa1f9821e96</id>
<content type='text'>
</content>
</entry>
<entry>
<title>HID: hid-input: Fix accessing freed memory during device disconnect</title>
<updated>2015-08-04T13:45:44Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski@samsung.com</email>
</author>
<published>2015-08-03T05:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0621809e37936e7c2b3eac9165cf2aad7f9189eb'/>
<id>urn:sha1:0621809e37936e7c2b3eac9165cf2aad7f9189eb</id>
<content type='text'>
During unbinding the driver was dereferencing a pointer to memory
already freed by power_supply_unregister().

Driver was freeing its internal description of battery through pointers
stored in power_supply structure. However, because the core owns the
power supply instance, after calling power_supply_unregister() this
memory is freed and the driver cannot access these members.

Fix this by storing the pointer to internal description of battery in a
local variable before calling power_supply_unregister(), so the pointer
remains valid.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reported-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: input: call input_sync() when automatically releasing a key</title>
<updated>2015-07-10T09:34:44Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2015-07-09T21:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3eb4351af42bd8b6de20daab07b204a85c35248f'/>
<id>urn:sha1:3eb4351af42bd8b6de20daab07b204a85c35248f</id>
<content type='text'>
We need to emit EV_SYN/SYN_REPORT between key press and release, otherwise
userspace is allowed to "swallow" the event.

[jkosina@suse.com: Dmitry says that he's observing this behavior with
 Plantronics headset]

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: hid-input: Fix coding style issue</title>
<updated>2015-05-28T08:41:45Z</updated>
<author>
<name>James C Boyd</name>
<email>jcboyd.dev@gmail.com</email>
</author>
<published>2015-05-27T22:09:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=323ddaa84f003a0c1d49f3ce5d106bc3cef070d5'/>
<id>urn:sha1:323ddaa84f003a0c1d49f3ce5d106bc3cef070d5</id>
<content type='text'>
This line is too long; split it up.

Signed-off-by: James C Boyd &lt;jcboyd.dev@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
