<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/iio/gyro, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-05T10:51:43Z</updated>
<entry>
<title>iio:gyro:itg3200: Fix timestamp alignment and prevent data leak.</title>
<updated>2020-11-05T10:51:43Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2020-07-22T15:50:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf4757c993eeacb36ba03e64555cbede46ab20d7'/>
<id>urn:sha1:bf4757c993eeacb36ba03e64555cbede46ab20d7</id>
<content type='text'>
commit 10ab7cfd5522f0041028556dac864a003e158556 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 a 16 byte array of smaller elements on the stack.
This is fixed by using an explicit c structure. As there are no
holes in the structure, there is no possiblity of data leakage
in this case.

The explicit alignment of ts is not strictly necessary but potentially
makes the code slightly less fragile.  It also removes the possibility
of this being cut and paste into another driver where the alignment
isn't already true.

Fixes: 36e0371e7764 ("iio:itg3200: Use iio_push_to_buffers_with_timestamp()")
Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200722155103.979802-6-jic23@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used</title>
<updated>2020-07-20T08:03:25Z</updated>
<author>
<name>Lee Jones</name>
</author>
<published>2020-07-17T16:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfec57537f5787135401badefab0a2db240b48d4'/>
<id>urn:sha1:bfec57537f5787135401badefab0a2db240b48d4</id>
<content type='text'>
'fxas21002c_reg_fields' is only used in '*core*', meaning that '*i2c*'
and '*spi*' complain of a defined but not used const variable.  Let's
move it into the source file.

Fixes the following W=1 kernel build warning(s):

 In file included from drivers/iio/gyro/fxas21002c_i2c.c:14:
 drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=]
 79 | static const struct reg_field fxas21002c_reg_fields[] = {
 | ^~~~~~~~~~~~~~~~~~~~~
 In file included from drivers/iio/gyro/fxas21002c_spi.c:14:
 drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=]
 79 | static const struct reg_field fxas21002c_reg_fields[] = {
 | ^~~~~~~~~~~~~~~~~~~~~

Cc: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: Move attach/detach of the poll func to the core</title>
<updated>2020-06-20T16:34:44Z</updated>
<author>
<name>Lars-Peter Clausen</name>
</author>
<published>2020-05-25T11:38:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f11d59d87b8622d4cf9f856c0b8029fb030d8612'/>
<id>urn:sha1:f11d59d87b8622d4cf9f856c0b8029fb030d8612</id>
<content type='text'>
All devices using a triggered buffer need to attach and detach the trigger
to the device in order to properly work. Instead of doing this in each and
every driver by hand move this into the core.

At this point in time, all drivers should have been resolved to
attach/detach the poll-function in the same order.

This patch removes all explicit calls of iio_triggered_buffer_postenable()
&amp; iio_triggered_buffer_predisable() in all drivers, since the core handles
now the pollfunc attach/detach.

The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's
not immediately obvious that removing the hooks doesn't break anything.
Eugen was able to test on at91-sama5d2-adc driver, sama5d2-xplained board.
All seems to be fine.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Tested-by: Eugen Hristev &lt;eugen.hristev@microchip.com&gt; #for at91-sama5d2-adc
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: remove explicit IIO device parent assignment</title>
<updated>2020-06-14T10:49:59Z</updated>
<author>
<name>Alexandru Ardelean</name>
</author>
<published>2020-05-22T08:22:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3be83244c7dfe686d23f1c0bac75915587fc044'/>
<id>urn:sha1:d3be83244c7dfe686d23f1c0bac75915587fc044</id>
<content type='text'>
This patch applies the semantic patch:
@@
expression I, P, SP;
@@
   I = devm_iio_device_alloc(P, SP);
   ...
-  I-&gt;dev.parent = P;

It updates 302 files and does 307 deletions.
This semantic patch also removes some comments like
'/* Establish that the iio_dev is a child of the i2c device */'

But this is is only done in case where the block is left empty.

The patch does not seem to cover all cases. It looks like in some cases a
different variable is used in some cases to assign the parent, but it
points to the same reference.
In other cases, the block covered by ... may be just too big to be covered
by the semantic patch.

However, this looks pretty good as well, as it does cover a big bulk of the
drivers that should remove the parent assignment.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger</title>
<updated>2020-05-10T08:35:53Z</updated>
<author>
<name>Alexandru Ardelean</name>
</author>
<published>2020-04-24T04:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=067fda1c065ff5655fcd2600f4b9f72a6ab5b7d9'/>
<id>urn:sha1:067fda1c065ff5655fcd2600f4b9f72a6ab5b7d9</id>
<content type='text'>
The main intent here is to get rid of the iio_buffer_set_attrs() helper, or
at least rework it's usage a bit.
The problem with that helper is that it needs a pointer to the buffer,
which makes supporting multiple buffers per IIO device a bit more
cumbersome.

The hid_sensor_setup_trigger() is pretty much used in the same way:
- iio_triggered_buffer_setup() gets called before
- then hid_sensor_setup_trigger() and hid_sensor_setup_batch_mode() gets
  called which may attach some fifo attributes

This change merges the 2 together under the hid_sensor_setup_trigger()
function. Only the &amp;iio_pollfunc_store_time is passed to all devices, so
it's not even required to pass it explicitly outside of the common
hid_sensor_setup_trigger() function.

Moving the devm_iio_triggered_buffer_setup/cleanup() calls into the common
place code can help the rework of the buffer code, since it is in one
place.

One detail of the change is that there are 2 drivers that use
devm_iio_triggered_buffer_setup(). That function gets implicitly
replaced with iio_triggered_buffer_setup()/cleanup(), but since all drivers
call both hid_sensor_setup_trigger9) &amp; hid_sensor_remove_trigger() trigger,
the iio_triggered_buffer_cleanup() piggy backs on the
hid_sensor_remove_trigger() call, which should cover the cleanup.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: imu: adis16xxx: use helper to access iio core debugfs dir</title>
<updated>2020-05-03T13:47:56Z</updated>
<author>
<name>Alexandru Ardelean</name>
</author>
<published>2020-04-30T11:04:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7190859abc0056d9514a9e2ff506850304a1288'/>
<id>urn:sha1:b7190859abc0056d9514a9e2ff506850304a1288</id>
<content type='text'>
The IIO core provides a iio_get_debugfs_dentry() helper.
It seems that the ADIS IMU drivers access that field directly.

This change converts them to use iio_get_debugfs_dentry() instead.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Acked-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: gyro: adis16130: Use get_unaligned_be24()</title>
<updated>2020-05-03T08:47:19Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-04-21T00:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e33ff8ac6dc9b4f1b8ee75ee3690561040ec0c1a'/>
<id>urn:sha1:e33ff8ac6dc9b4f1b8ee75ee3690561040ec0c1a</id>
<content type='text'>
This makes the driver code slightly easier to read.

Cc: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Michael Hennerich &lt;Michael.Hennerich@analog.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name</title>
<updated>2020-04-19T15:56:16Z</updated>
<author>
<name>Nishant Malpani</name>
</author>
<published>2020-03-22T17:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e5fd387657abfed7da96edd8a313babb7f6a66a'/>
<id>urn:sha1:0e5fd387657abfed7da96edd8a313babb7f6a66a</id>
<content type='text'>
Utilize %pe format specifier from vsprintf while printing error logs
with dev_err(). Discards the use of unnecessary explicit casting and
prints symbolic error name which might prove to be convenient during
debugging.

Signed-off-by: Nishant Malpani &lt;nish.malpani25@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error name</title>
<updated>2020-04-19T15:56:16Z</updated>
<author>
<name>Nishant Malpani</name>
</author>
<published>2020-03-22T17:23:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df91cf5c289c4dfe46aa7ef32231cc827b7e4d61'/>
<id>urn:sha1:df91cf5c289c4dfe46aa7ef32231cc827b7e4d61</id>
<content type='text'>
Utilize %pe format specifier from vsprintf while printing error logs
with dev_err(). Discards the use of unnecessary explicit casting and
prints symbolic error name which might prove to be convenient during
debugging.

Signed-off-by: Nishant Malpani &lt;nish.malpani25@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name</title>
<updated>2020-04-19T15:56:15Z</updated>
<author>
<name>Nishant Malpani</name>
</author>
<published>2020-03-22T17:23:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=442140989f2d777d9cf02622c76f0ac8a4b891b3'/>
<id>urn:sha1:442140989f2d777d9cf02622c76f0ac8a4b891b3</id>
<content type='text'>
Utilize %pe format specifier from vsprintf while printing error logs
with dev_err(). Discards the use of unnecessary explicit casting and
prints symbolic error name which might prove to be convenient during
debugging.

Signed-off-by: Nishant Malpani &lt;nish.malpani25@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
