<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/iio/magnetometer, branch linux-5.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-07-22T07:34:03Z</updated>
<entry>
<title>iio: magnetometer: ak8974: Fix runtime PM imbalance on error</title>
<updated>2020-07-22T07:34:03Z</updated>
<author>
<name>Dinghao Liu</name>
</author>
<published>2020-05-26T10:47:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69c88d9cf10779a8b2b939be7020522c0a101627'/>
<id>urn:sha1:69c88d9cf10779a8b2b939be7020522c0a101627</id>
<content type='text'>
commit 0187294d227dfc42889e1da8f8ce1e44fc25f147 upstream.

When devm_regmap_init_i2c() returns an error code, a pairing
runtime PM usage counter decrement is needed to keep the
counter balanced. For error paths after ak8974_set_power(),
ak8974_detect() and ak8974_reset(), things are the same.

However, When iio_triggered_buffer_setup() returns an error
code, there will be two PM usgae counter decrements.

Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974")
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iio:magnetometer:ak8974: Fix alignment and data leak issues</title>
<updated>2020-07-22T07:34:02Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2020-06-07T15:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=496f933df1165a0ed826c345e295c977eb7fc7b4'/>
<id>urn:sha1:496f933df1165a0ed826c345e295c977eb7fc7b4</id>
<content type='text'>
commit 838e00b13bfd4cac8b24df25bfc58e2eb99bcc70 upstream.

One of a class of bugs pointed out by Lars in a recent review.
iio_push_to_buffers_with_timestamp assumes the buffer used is aligned
to the size of the timestamp (8 bytes).  This is not guaranteed in
this driver which uses an array of smaller elements on the stack.
As Lars also noted this anti pattern can involve a leak of data to
userspace and that indeed can happen here.  We close both issues by
moving to a suitable structure in the iio_priv() data.

This data is allocated with kzalloc so no data can leak appart from
previous readings.

Fixes: 7c94a8b2ee8cf ("iio: magn: add a driver for AK8974")
Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iio: magnetometer: ak8974: Fix negative raw values in sysfs</title>
<updated>2020-02-21T11:59:46Z</updated>
<author>
<name>Stephan Gerhold</name>
</author>
<published>2020-02-14T11:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b500c086e4110829a308c23e83a7cdc65b26228a'/>
<id>urn:sha1:b500c086e4110829a308c23e83a7cdc65b26228a</id>
<content type='text'>
At the moment, reading from in_magn_*_raw in sysfs tends to return
large values around 65000, even though the output of ak8974 is actually
limited to ±32768. This happens because the value is never converted
to the signed 16-bit integer variant.

Add an explicit cast to s16 to fix this.

Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974")
Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Reviewed-by: Linus Waleij &lt;linus.walleij@linaro.org&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: ak8975: Convert to use device_get_match_data()</title>
<updated>2020-01-18T11:43:17Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-01-15T17:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71f221f8a0cd73f985e37d8a05dea2d63eb95b71'/>
<id>urn:sha1:71f221f8a0cd73f985e37d8a05dea2d63eb95b71</id>
<content type='text'>
Convert to use device_get_match_data() instead of open coded variant.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: magnetometer: ak8975: Get rid of platform data</title>
<updated>2020-01-18T11:43:17Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-01-15T17:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=608184788502fd475e7bca4b1692fda5f0fef5b6'/>
<id>urn:sha1:608184788502fd475e7bca4b1692fda5f0fef5b6</id>
<content type='text'>
Since IIO framework supports device property API and driver has been moved
already to the use of GPIO descriptors the logical continuation is to
get rid of platform data completely. We are on the safe side here since
there are no users of it in the kernel.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: Make use of device properties</title>
<updated>2020-01-13T21:53:39Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2019-12-16T17:38:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecb27c5e430785018199dd42e566711022d32523'/>
<id>urn:sha1:ecb27c5e430785018199dd42e566711022d32523</id>
<content type='text'>
Device property API allows to gather device resources from different sources,
such as ACPI. Convert the drivers to unleash the power of device property API.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: Drop redundant parameter from st_sensors_of_name_probe()</title>
<updated>2020-01-13T21:51:52Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2019-12-16T17:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=efc78983d21aeaf692006d42b92a006cdce3ed4d'/>
<id>urn:sha1:efc78983d21aeaf692006d42b92a006cdce3ed4d</id>
<content type='text'>
Since we have access to the struct device_driver and thus to the ID table,
there is no need to supply special parameters to st_sensors_of_name_probe().

Besides that we have a common API to get driver match data, there is
no need to do matching separately for OF and ACPI.

Taking into consideration above, simplify the ST sensors code.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: ak8975: Convert to use GPIO descriptor</title>
<updated>2019-12-15T11:42:14Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2019-12-02T08:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c289e63944467a41c6703f46bcf2f3340713510'/>
<id>urn:sha1:2c289e63944467a41c6703f46bcf2f3340713510</id>
<content type='text'>
The end-of-conversion (EOC) GPIO line is better to grab using
a GPIO descriptor. We drop the pdata for this: clients using board
files can use machine descriptor tables to pass this GPIO from
static data.

Cc: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st: Drop GPIO include</title>
<updated>2019-10-27T15:55:45Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2019-10-23T08:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=12737476e0992bde3e14e2df2fedf43a117abf71'/>
<id>urn:sha1:12737476e0992bde3e14e2df2fedf43a117abf71</id>
<content type='text'>
None of the ST sensor drivers use any symbols from
&lt;linux/gpio.h&gt;, just drop the include from all of them.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio:st_sensors: remove buffer allocation at each buffer enable</title>
<updated>2019-08-11T08:26:04Z</updated>
<author>
<name>Denis Ciocca</name>
</author>
<published>2019-08-05T18:57:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e031d5f558f1535968df1ecae8d734b84c17f78d'/>
<id>urn:sha1:e031d5f558f1535968df1ecae8d734b84c17f78d</id>
<content type='text'>
This patch is removing the buffer allocation at each buffer enable.
We just allocate enough memory in the main structure during probe
to cover maximum size needed (that anyway is pretty small) [16bytes].

Signed-off-by: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
