<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/iio/orientation, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-11-16T11:42:12Z</updated>
<entry>
<title>iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers</title>
<updated>2018-11-16T11:42:12Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-10-31T14:20:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0145b50566e7de5637e80ecba96c7f0e6fff1aad'/>
<id>urn:sha1:0145b50566e7de5637e80ecba96c7f0e6fff1aad</id>
<content type='text'>
Before this commit sensor_hub_input_attr_get_raw_value() failed to take
the signedness of 16 and 8 bit values into account, returning e.g.
65436 instead of -100 for the z-axis reading of an accelerometer.

This commit adds a new is_signed parameter to the function and makes all
callers pass the appropriate value for this.

While at it, this commit also fixes up some neighboring lines where
statements were needlessly split over 2 lines to improve readability.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio:orientation: drop assign iio_info.driver_module</title>
<updated>2017-08-22T20:33:36Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>jic23@kernel.org</email>
</author>
<published>2017-07-23T16:26:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1b449a72580e8c97ae0cef3efcfa18e9ca438693'/>
<id>urn:sha1:1b449a72580e8c97ae0cef3efcfa18e9ca438693</id>
<content type='text'>
The equivalent of this is now done via macro magic when
the relevant register call is made.  The actual structure
elements will shortly go away.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
</content>
</entry>
<entry>
<title>iio: orientation: hid-sensor-rotation: Drop unnecessary static</title>
<updated>2017-07-17T20:45:01Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2017-07-15T20:07:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=50db2cd408a4a8883e738874208c84527e3c6a41'/>
<id>urn:sha1:50db2cd408a4a8883e738874208c84527e3c6a41</id>
<content type='text'>
Drop static on a local variable, when the variable is initialized before
any possible use.  Thus, the static has no benefit.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@bad exists@
position p;
identifier x;
type T;
@@
static T x@p;
...
x = &lt;+...x...+&gt;

@@
identifier x;
expression e;
type T;
position p != bad.p;
@@
-static
 T x@p;
 ... when != x
     when strict
?x = e;
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: hid-sensor-rotation: Add "scale" and "offset" properties parse support</title>
<updated>2017-05-07T11:22:36Z</updated>
<author>
<name>Song Hongyan</name>
<email>hongyan.song@intel.com</email>
</author>
<published>2017-05-07T10:24:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a78587d338d084037b0ea6687508f207d8dec2fb'/>
<id>urn:sha1:a78587d338d084037b0ea6687508f207d8dec2fb</id>
<content type='text'>
Add orientation sensor "scale" and "offset" parse support.
These two properties are needed for exponent data conversion.

Signed-off-by: Song Hongyan &lt;hongyan.song@intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Reviewed-by: Xu Even &lt;even.xu@intel.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: hid-sensor-rotation: Add geomagnetic orientation sensor hid support.</title>
<updated>2017-05-07T11:22:33Z</updated>
<author>
<name>Song Hongyan</name>
<email>hongyan.song@intel.com</email>
</author>
<published>2017-05-07T10:24:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=00907c7a3282053dd4782e02c3101809608e7ea7'/>
<id>urn:sha1:00907c7a3282053dd4782e02c3101809608e7ea7</id>
<content type='text'>
Geomagnetic orientation(AM) sensor is one kind of orientation 6dof sensor.
It gives the device rotation in respect to the earth center and the
magnetic north. The sensor is implemented through use of an accelerometer
and magnetometer do not use gyroscope. It is a standard HID sensor.

More information can be found in:
http://www.usb.org/developers/hidpage/HUTRR59_-_Usages_for_Wearables.pdf

Geomagnetic orientation(AM) sensor and dev rotation sensor have same
channel and share channel usage id. So the most of the code for relative
orientation sensor can be reused.

Signed-off-by: Song Hongyan &lt;hongyan.song@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: hid-sensor-rotation: Add relative orientation sensor hid support</title>
<updated>2017-05-07T11:22:27Z</updated>
<author>
<name>Song Hongyan</name>
<email>hongyan.song@intel.com</email>
</author>
<published>2017-05-07T10:24:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9ff88edc5e7bad08bdd79a20f14533a5cf44b865'/>
<id>urn:sha1:9ff88edc5e7bad08bdd79a20f14533a5cf44b865</id>
<content type='text'>
Relative orientation(AG) sensor is a 6dof orientation sensor,
it depends on acceleration and gyroscope sensor data. It gives
a quaternion describing the orientation of the device relative
to an initial orientation. It is a standard HID sensor.

More information can be found in:
http://www.usb.org/developers/hidpage/HUTRR59_-_Usages_for_Wearables.pdf

Relative orientation(AG) sensor and dev rotation sensor have same
channels and share channel usage id. So the most of the code for
relative orientation sensor can be reused.

Signed-off-by: Song Hongyan &lt;hongyan.song@intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Reviewed-by: Xu Even &lt;even.xu@intel.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver)</title>
<updated>2016-11-05T17:47:47Z</updated>
<author>
<name>Song Hongyan</name>
<email>hongyan.song@intel.com</email>
</author>
<published>2016-10-25T01:06:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8af644a7d6846f48d6b72be5d4a3c6eb16bd33c8'/>
<id>urn:sha1:8af644a7d6846f48d6b72be5d4a3c6eb16bd33c8</id>
<content type='text'>
This fix makes newer ISH hubs work. Previous ones worked by lucky
coincidence.

Rotation sensor function does not work due to miss PM function.
Add common hid sensor iio pm function for rotation sensor.

Further clarification from Srinivas:

If CONFIG_PM is not defined, then this prevents this sensor to
function. So above commit caused this.

This sensor was supposed to be always on to trigger wake up in prior
external hubs. But with the new ISH hub this is not the case.

Signed-off-by: Song Hongyan &lt;hongyan.song@intel.com&gt;
Fixes: 2b89635e9a9e ("iio: hid_sensor_hub: Common PM functions")
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: orientation: hid-sensor-rotation: Fix memory leak in probe()</title>
<updated>2015-05-17T08:10:25Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-05-13T18:06:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2bd04628435ff57a2fefa71e7d3e5c005db5c978'/>
<id>urn:sha1:2bd04628435ff57a2fefa71e7d3e5c005db5c978</id>
<content type='text'>
'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev-&gt;channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: orientation: hid-sensor-incl-3d: Fix memory leak in probe()</title>
<updated>2015-05-17T08:10:14Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-05-13T18:06:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=32ee56e306b09568619466efe109ab9722e89245'/>
<id>urn:sha1:32ee56e306b09568619466efe109ab9722e89245</id>
<content type='text'>
'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev-&gt;channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: hid-sensor-rotation: Constify platform_device_id</title>
<updated>2015-05-10T19:31:47Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski.k@gmail.com</email>
</author>
<published>2015-05-01T15:53:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6b490c6c6702b1404d3ae93a9d0ace211d40c094'/>
<id>urn:sha1:6b490c6c6702b1404d3ae93a9d0ace211d40c094</id>
<content type='text'>
The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski.k@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
</feed>
