<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/iio/imu/adis_buffer.c, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-14T15:00:09Z</updated>
<entry>
<title>iio: adis_buffer: do not return ints in irq handlers</title>
<updated>2021-07-14T15:00:09Z</updated>
<author>
<name>Nuno Sa</name>
</author>
<published>2021-04-22T10:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48a4fc2acdf48ba2c0e891b6f9e70145f857246e'/>
<id>urn:sha1:48a4fc2acdf48ba2c0e891b6f9e70145f857246e</id>
<content type='text'>
[ Upstream commit d877539ad8e8fdde9af69887055fec6402be1a13 ]

On an IRQ handler we should not return normal error codes as 'irqreturn_t'
is expected.

Not necessarily stable material as the old check cannot fail, so it's a bug
we can not hit.

Fixes: ccd2b52f4ac69 ("staging:iio: Add common ADIS library")
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Signed-off-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Link: https://lore.kernel.org/r/20210422101911.135630-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adis: Move burst mode into adis_data</title>
<updated>2020-09-21T19:01:45Z</updated>
<author>
<name>Nuno Sá</name>
</author>
<published>2020-09-17T15:52:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36e322ec5dd24f1d0840061ffe406458669bccf1'/>
<id>urn:sha1:36e322ec5dd24f1d0840061ffe406458669bccf1</id>
<content type='text'>
Add burst mode variables in the per device specific data structure. As
some drivers support multiple devices with different burst sizes it
makes sense this data to be in `adis_data`. While moving the variables,
there are two main differences:

1. The `en`variable is dropped. If a device supports burst mode, it will
just use it as it will has better performance for almost all real use
cases.
2. Replace `extra_len` by `burst_len`. Users should now explicitly
define the length of the burst buffer as it is typically constant. This
also allows to remove the following line from the library:

```
/* All but the timestamp channel */
burst_length = (indio_dev-&gt;num_channels - 1) * sizeof(u16);
```

The library should not assume that a timestamp channel is defined.
Moreover, most parts also include some diagnostic data, crc, etc.. in
the burst buffer that needed to be included in an `extra_len` variable
which is not that nice. On top of this, some devices already start to
have some 32bit size channels ...

This patch is also a move to completely drop the `struct adis_burst`
from the library.

Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Link: https://lore.kernel.org/r/20200917155223.218500-2-nuno.sa@analog.com
</content>
</entry>
<entry>
<title>iio: adis: Drop non Managed device functions</title>
<updated>2020-09-16T18:06:10Z</updated>
<author>
<name>Nuno Sá</name>
</author>
<published>2020-09-15T12:02:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8f0cd76684e679d4a8ec4929fcdf6c3a030a007'/>
<id>urn:sha1:d8f0cd76684e679d4a8ec4929fcdf6c3a030a007</id>
<content type='text'>
Drop `adis_setup_buffer_and_trigger()`. All users were updated to use
the devm version of this function. This avoids having almost the same
code repeated.

Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Link: https://lore.kernel.org/r/20200915120258.161587-11-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adis: Support different burst sizes</title>
<updated>2020-04-25T15:11:56Z</updated>
<author>
<name>Nuno Sá</name>
</author>
<published>2020-04-13T08:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e04cb60e872b9433e523d62c39addf0bd1a18f1'/>
<id>urn:sha1:3e04cb60e872b9433e523d62c39addf0bd1a18f1</id>
<content type='text'>
Add burst_max_len to `adis_burst`. This is useful for devices which
support different burst modes with different sizes. The buffer to be
used in the spi transfer is allocated with this variable making sure
that has space for all burst modes. The spi transfer length should hold
the "real" burst length depending on the current burst mode configured
in the device.

Moreover, `extra_len` in `adis_burst` is made const and it should
contain the smallest extra length necessary for a burst transfer. In
`struct adis` was added a new `burst_extra_len` that should hold the
extra bytes needed depending on the device instance being used.

Signed-off-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: imu: adis: Add Managed device functions</title>
<updated>2020-04-25T15:08:06Z</updated>
<author>
<name>Nuno Sá</name>
</author>
<published>2020-04-13T08:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fec86c6b8369b5dd8e3a1ad3752578a737163b25'/>
<id>urn:sha1:fec86c6b8369b5dd8e3a1ad3752578a737163b25</id>
<content type='text'>
This patch adds support for a managed device version of
adis_setup_buffer_and_trigger. It works exactly as the original
one but it calls all the devm_iio_* functions to setup an iio
buffer and trigger. Hence we do not need to care about cleaning those
and we do not need to support a remove() callback for every driver using
the adis library.

Signed-off-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: imu: adis_buffer: Use new structure for SPI transfer delays</title>
<updated>2020-03-08T17:28:45Z</updated>
<author>
<name>Sergiu Cuciurean</name>
</author>
<published>2020-02-27T12:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61e618be6a0efa8728e2172dc47c47c72217d49b'/>
<id>urn:sha1:61e618be6a0efa8728e2172dc47c47c72217d49b</id>
<content type='text'>
In a recent change to the SPI subsystem [1], a new `delay` struct was added
to replace the `delay_usecs`. This change replaces the current
`delay_usecs` with `delay` for this driver.

The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
that both `delay_usecs` &amp; `delay` are used (in this order to preserve
backwards compatibility).

[1] commit bebcfd272df6 ("spi: introduce `delay` field for
`spi_transfer` + spi_transfer_delay_exec()")

Signed-off-by: Sergiu Cuciurean &lt;sergiu.cuciurean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: imu: adis: rename txrx_lock -&gt; state_lock</title>
<updated>2019-11-23T11:53:10Z</updated>
<author>
<name>Alexandru Ardelean</name>
</author>
<published>2019-11-22T13:24:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a9afcb198b4de323485c0ee94ff09f653012d4b'/>
<id>urn:sha1:6a9afcb198b4de323485c0ee94ff09f653012d4b</id>
<content type='text'>
The lock can be extended a bit to protect other elements that are not
particular to just TX/RX. Another idea would have been to just add a new
`state_lock`, but that would mean 2 locks which would be redundant, and
probably cause more potential for dead-locks.

What will be done in the next patches, will be to add some unlocked
versions for read/write_reg functions.

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: imu: adis16400: fix memory leak</title>
<updated>2019-10-09T18:11:27Z</updated>
<author>
<name>Navid Emamdoost</name>
</author>
<published>2019-09-19T15:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c0530e898f384c5d279bfcebd8bb17af1105873'/>
<id>urn:sha1:9c0530e898f384c5d279bfcebd8bb17af1105873</id>
<content type='text'>
In adis_update_scan_mode_burst, if adis-&gt;buffer allocation fails release
the adis-&gt;xfer.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Reviewed-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: imu: adis16400: release allocated memory on failure</title>
<updated>2019-10-09T18:11:27Z</updated>
<author>
<name>Navid Emamdoost</name>
</author>
<published>2019-09-19T15:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab612b1daf415b62c58e130cb3d0f30b255a14d0'/>
<id>urn:sha1:ab612b1daf415b62c58e130cb3d0f30b255a14d0</id>
<content type='text'>
In adis_update_scan_mode, if allocation for adis-&gt;buffer fails,
previously allocated adis-&gt;xfer needs to be released.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Reviewed-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149</title>
<updated>2019-05-30T18:25:18Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-24T10:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80503b23b23b5b2228d8750b786eb182f2fa28d2'/>
<id>urn:sha1:80503b23b23b5b2228d8750b786eb182f2fa28d2</id>
<content type='text'>
Based on 1 normalized pattern(s):

  licensed under the gpl 2 or later

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 82 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190524100845.150836982@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
