<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hid/hid-sensor-hub.c, branch v4.0-rc1</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: hid-sensor-hub: Use mfd_add_hotplug_devices() helper</title>
<updated>2014-11-25T16:18:42+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2014-09-26T10:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=16b5fe2966b8dc4a474d6618d382d26933d90b24'/>
<id>16b5fe2966b8dc4a474d6618d382d26933d90b24</id>
<content type='text'>
Use mfd_add_hotplug_devices() helper to register the subdevices.

Compile-only tested.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use mfd_add_hotplug_devices() helper to register the subdevices.

Compile-only tested.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hid-sensor-hub: re-add mistakenly removed USB_DEVICE_ID_STM_HID_SENSOR id</title>
<updated>2014-09-04T06:49:30+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2014-09-03T23:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=467669c5740a6f27780b991016995f95a6d47836'/>
<id>467669c5740a6f27780b991016995f95a6d47836</id>
<content type='text'>
Adding USB_DEVICE_ID_STM_HID_SENSOR again in the quirk table. During 3.16 merge
cycle somehow quirk for device id USB_DEVICE_ID_STM_HID_SENSOR is missing.
I see commit dde3b45cd74e ("HID: hid-sensor-hub: new device id and quirk
for STM Sensor hub") added new id USB_DEVICE_ID_STM_HID_SENSOR_1,
but didn't really delete the old device id.
Anyway we need to add this back, otherwise it breaks ST sensor hubs.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.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>
Adding USB_DEVICE_ID_STM_HID_SENSOR again in the quirk table. During 3.16 merge
cycle somehow quirk for device id USB_DEVICE_ID_STM_HID_SENSOR is missing.
I see commit dde3b45cd74e ("HID: hid-sensor-hub: new device id and quirk
for STM Sensor hub") added new id USB_DEVICE_ID_STM_HID_SENSOR_1,
but didn't really delete the old device id.
Anyway we need to add this back, otherwise it breaks ST sensor hubs.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hid-sensor-hub: use devm_ functions consistently</title>
<updated>2014-08-12T14:27:22+00:00</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-08-02T22:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5be5db24fc0883d9e38df378c1de9a00f8933999'/>
<id>5be5db24fc0883d9e38df378c1de9a00f8933999</id>
<content type='text'>
Use devm_kzalloc for all calls to kzalloc and not just the first.  Use
devm functions for other allocations as well. The calls to free the
allocated memory in the probe and remove functions are done away with
and a label is removed in the probe function.

The semantic match that finds the inconsistency is as follows:

// &lt;smpl&gt;
@@
@@

*devm_kzalloc(...)
...
*kzalloc(...)
// &lt;/smpl&gt;

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Reviewed-by: Srinivas Pandruvada &lt;srinivas.pandruvada@intel.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>
Use devm_kzalloc for all calls to kzalloc and not just the first.  Use
devm functions for other allocations as well. The calls to free the
allocated memory in the probe and remove functions are done away with
and a label is removed in the probe function.

The semantic match that finds the inconsistency is as follows:

// &lt;smpl&gt;
@@
@@

*devm_kzalloc(...)
...
*kzalloc(...)
// &lt;/smpl&gt;

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Reviewed-by: Srinivas Pandruvada &lt;srinivas.pandruvada@intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sensor-hub: fix potential memory leak</title>
<updated>2014-06-30T11:21:50+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2014-06-30T09:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ceec634076b91bea57107541a46e92d765c69488'/>
<id>ceec634076b91bea57107541a46e92d765c69488</id>
<content type='text'>
hsdev is not freed in sensor_hub_probe when kasprintf inside the for
loop fails. This is because hsdev is not set to platform_data yet (to
be freed by the code in the err_no_mem label). So free the memory
explicitly in the 'if' branch, as this is the only place where this is
(and will) be needed.

Reported-by: coverity
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: srinivas pandruvada &lt;srinivas.pandruvada@intel.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>
hsdev is not freed in sensor_hub_probe when kasprintf inside the for
loop fails. This is because hsdev is not set to platform_data yet (to
be freed by the code in the err_no_mem label). So free the memory
explicitly in the 'if' branch, as this is the only place where this is
(and will) be needed.

Reported-by: coverity
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: srinivas pandruvada &lt;srinivas.pandruvada@intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sensor-hub: make dyn_callback_lock IRQ-safe</title>
<updated>2014-06-10T09:05:43+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2014-06-10T09:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0ccf091d1fbc1f99bb7f93bff8cf346769a9b0cd'/>
<id>0ccf091d1fbc1f99bb7f93bff8cf346769a9b0cd</id>
<content type='text'>
dyn_callback_lock is being taken from IRQ context through hid_irq_in() -&gt;
hid_input_report() -&gt; sensor_hub_raw_event() -&gt; sensor_hub_get_callback(),
therefore anyone else acquiring it needs to disable IRQs to disable deadlocks.

Reported-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Tested-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Reported-by: Reyad Attiyat &lt;reyad.attiyat@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>
dyn_callback_lock is being taken from IRQ context through hid_irq_in() -&gt;
hid_input_report() -&gt; sensor_hub_raw_event() -&gt; sensor_hub_get_callback(),
therefore anyone else acquiring it needs to disable IRQs to disable deadlocks.

Reported-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Tested-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Reported-by: Reyad Attiyat &lt;reyad.attiyat@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'for-3.15/upstream-fixes' and 'for-3.16/upstream' into for-linus</title>
<updated>2014-06-04T11:09:01+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2014-06-04T11:09:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=af5666e0f76023d9c296016024297903a4c83108'/>
<id>af5666e0f76023d9c296016024297903a4c83108</id>
<content type='text'>
Conflicts:
	drivers/hid/hid-sensor-hub.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/hid/hid-sensor-hub.c
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hid-sensor-hub: new device id and quirk for STM Sensor hub</title>
<updated>2014-06-02T11:14:06+00:00</updated>
<author>
<name>Archana Patni</name>
<email>archana.patni@linux.intel.com</email>
</author>
<published>2014-06-02T11:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dde3b45cd74e439457ed0126788aa40bd37f615e'/>
<id>dde3b45cd74e439457ed0126788aa40bd37f615e</id>
<content type='text'>
Added STM sensor hub new device id. Also added this new device
in HID_SENSOR_HUB_ENUM_QUIRK to fix report descriptors.
These devices uses old FW which uses logical 0 as minimum.
In these, HID reports are not using proper collection classes.
So we need to fix report descriptors,for such devices. This
will not have any impact, if the FW uses logical 1 as minimum.

Signed-off-by: Archana Patni &lt;archana.patni@intel.com&gt;
Signed-off-by: Subramony Sesha &lt;subramony.sesha@intel.com&gt;
Reviewed-by: Srinivas Pandruvada &lt;srinivas.pandruvada@intel.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>
Added STM sensor hub new device id. Also added this new device
in HID_SENSOR_HUB_ENUM_QUIRK to fix report descriptors.
These devices uses old FW which uses logical 0 as minimum.
In these, HID reports are not using proper collection classes.
So we need to fix report descriptors,for such devices. This
will not have any impact, if the FW uses logical 1 as minimum.

Signed-off-by: Archana Patni &lt;archana.patni@intel.com&gt;
Signed-off-by: Subramony Sesha &lt;subramony.sesha@intel.com&gt;
Reviewed-by: Srinivas Pandruvada &lt;srinivas.pandruvada@intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hid-sensor-hub: Set report quirk for Microsoft Surface</title>
<updated>2014-05-28T14:24:53+00:00</updated>
<author>
<name>Reyad Attiyat</name>
<email>reyad.attiyat@gmail.com</email>
</author>
<published>2014-05-27T07:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=00478ee8984a80e531ed491eede0459eae07396d'/>
<id>00478ee8984a80e531ed491eede0459eae07396d</id>
<content type='text'>
Add the Microsoft Surface Pro 2 Type/Touch and default device hardware ID's
Set report quirk for the device in hid-sensor-hub

Signed-off-by: Reyad Attiyat &lt;reyad.attiyat@gmail.com&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.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 the Microsoft Surface Pro 2 Type/Touch and default device hardware ID's
Set report quirk for the device in hid-sensor-hub

Signed-off-by: Reyad Attiyat &lt;reyad.attiyat@gmail.com&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sensor-hub: Add in quirk for sensor hub in Lenovo Ideapad Yogas</title>
<updated>2014-05-05T23:01:49+00:00</updated>
<author>
<name>Peter F. Patel-Schneider</name>
<email>pfpschneider@gmail.com</email>
</author>
<published>2014-05-05T22:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=825747bb85634a2a7b7dce4e373831e211ab1644'/>
<id>825747bb85634a2a7b7dce4e373831e211ab1644</id>
<content type='text'>
The sensor hub in Lenovo Yogas needs the enumeration quirk.  I've been running
the patch for over a month with no problems, whereas the unpatched drivers
reliably mis-initialized the sensors.

Signed-off-by: Peter F. Patel-Schneider &lt;pfpschneider@gmail.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.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 sensor hub in Lenovo Yogas needs the enumeration quirk.  I've been running
the patch for over a month with no problems, whereas the unpatched drivers
reliably mis-initialized the sensors.

Signed-off-by: Peter F. Patel-Schneider &lt;pfpschneider@gmail.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: sensor-hub: add sensor hub quirk for ThinkPad Helix</title>
<updated>2014-04-03T20:47:28+00:00</updated>
<author>
<name>Stephen Chandler Paul</name>
<email>thatslyude@gmail.com</email>
</author>
<published>2014-04-03T20:27:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=30f58877bfdaa562d329ec870f948b4d03e1ab03'/>
<id>30f58877bfdaa562d329ec870f948b4d03e1ab03</id>
<content type='text'>
Just like some of the other laptops/tablets on the market with ultrabook
sensors, the ThinkPad Helix's sensor hub requires a special quirk in
order for it to power on properly. Without it the sensors are detected
by the kernel and set up as usual, but they won't output any data. This
will also fix the sensors on any other laptops with the same model of
sensor hub.

Signed-off-by: Stephen Chandler Paul &lt;thatslyude@gmail.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.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>
Just like some of the other laptops/tablets on the market with ultrabook
sensors, the ThinkPad Helix's sensor hub requires a special quirk in
order for it to power on properly. Without it the sensors are detected
by the kernel and set up as usual, but they won't output any data. This
will also fix the sensors on any other laptops with the same model of
sensor hub.

Signed-off-by: Stephen Chandler Paul &lt;thatslyude@gmail.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
