<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/iio, branch v5.13</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.13</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.13'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-05-22T07:32:36Z</updated>
<entry>
<title>iio: adc: ad7793: Add missing error code in ad7793_setup()</title>
<updated>2021-05-22T07:32:36Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2021-05-14T08:02:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4ed243b1da169bcbc1ec5507867e56250c5f1ff9'/>
<id>urn:sha1:4ed243b1da169bcbc1ec5507867e56250c5f1ff9</id>
<content type='text'>
Set error code while device ID query failed.

Fixes: 88bc30548aae ("IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.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: adc: ad7923: Fix undersized rx buffer.</title>
<updated>2021-05-22T07:32:36Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-05-01T16:53:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01fcf129f61b26d5b3d2d8afb03e770dee271bc8'/>
<id>urn:sha1:01fcf129f61b26d5b3d2d8afb03e770dee271bc8</id>
<content type='text'>
Fixes tag is where the max channels became 8, but timestamp space was missing
before that.

Fixes: 851644a60d20 ("iio: adc: ad7923: Add support for the ad7908/ad7918/ad7928")
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Daniel Junho &lt;djunho@gmail.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210501165314.511954-3-jic23@kernel.org
Cc: &lt;Stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp()</title>
<updated>2021-05-22T07:32:36Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-05-01T16:53:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1caeebab07e9d72eec534489f47964782b93ba9'/>
<id>urn:sha1:a1caeebab07e9d72eec534489f47964782b93ba9</id>
<content type='text'>
Add space for the timestamp to be inserted.  Also ensure correct
alignment for passing to iio_push_to_buffers_with_timestamp()

Fixes: a5f8c7da3dbe ("iio: adc: Add AD7768-1 ADC basic support")
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210501165314.511954-2-jic23@kernel.org
Cc: &lt;Stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: dac: ad5770r: Put fwnode in error case during -&gt;probe()</title>
<updated>2021-05-22T07:32:36Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andy.shevchenko@gmail.com</email>
</author>
<published>2021-05-10T09:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=98b7b0ca0828907dbb706387c11356a45463e2ea'/>
<id>urn:sha1:98b7b0ca0828907dbb706387c11356a45463e2ea</id>
<content type='text'>
device_for_each_child_node() bumps a reference counting of a returned variable.
We have to balance it whenever we return to the caller.

Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support")
Cc: Alexandru Tachici &lt;alexandru.tachici@analog.com&gt;
Signed-off-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210510095649.3302835-1-andy.shevchenko@gmail.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: gyro: fxas21002c: balance runtime power in error path</title>
<updated>2021-05-22T07:32:27Z</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-05-12T22:39:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2a54c8c9ebc2006bf72554afc84ffc67768979a0'/>
<id>urn:sha1:2a54c8c9ebc2006bf72554afc84ffc67768979a0</id>
<content type='text'>
If we fail to read temperature or axis we need to decrement the
runtime pm reference count to trigger autosuspend.

Add the call to pm_put to do that in case of error.

Fixes: a0701b6263ae ("iio: gyro: add core driver for fxas21002c")
Suggested-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/linux-iio/CBBZA9T1OY9C.2611WSV49DV2G@arch-thunder/
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7192: handle regulator voltage error first</title>
<updated>2021-05-13T15:36:49Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>aardelean@deviqon.com</email>
</author>
<published>2021-05-13T12:07:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b0f27fca5a6c7652e265aae6a4452ce2f2ed64da'/>
<id>urn:sha1:b0f27fca5a6c7652e265aae6a4452ce2f2ed64da</id>
<content type='text'>
This change fixes a corner-case, where for a zero regulator value, the
driver would exit early, initializing the driver only partially.
The driver would be in an unknown state.

This change reworks the code to check regulator_voltage() return value
for negative (error) first, and return early. This is the more common
idiom.

Also, this change is removing the 'voltage_uv' variable and using the 'ret'
value directly. The only place where 'voltage_uv' is being used is to
compute the internal reference voltage, and the type of this variable is
'int' (same are for 'ret'). Using only 'ret' avoids having to assign it on
the error path.

Fixes: ab0afa65bbc7 ("staging: iio: adc: ad7192: fail probe on get_voltage")
Cc: Alexandru Tachici &lt;alexandru.tachici@analog.com&gt;
Signed-off-by: Alexandru Ardelean &lt;aardelean@deviqon.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7192: Avoid disabling a clock that was never enabled.</title>
<updated>2021-05-13T15:34:21Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-05-13T12:07:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e32fe6d90f44922ccbb94016cfc3c238359e3e39'/>
<id>urn:sha1:e32fe6d90f44922ccbb94016cfc3c238359e3e39</id>
<content type='text'>
Found by inspection.

If the internal clock source is being used, the driver doesn't
call clk_prepare_enable() and as such we should not call
clk_disable_unprepare()

Use the same condition to protect the disable path as is used
on the enable one.  Note this will all get simplified when
the driver moves over to a full devm_ flow, but that would make
backporting the fix harder.

Fix obviously predates move out of staging, but backporting will
become more complex (and is unlikely to happen), hence that patch
is given in the fixes tag.

Alexandru's sign off is here because he added this patch into
a larger series that Jonathan then applied.

Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of staging")
Cc: Alexandru Tachici &lt;alexandru.tachici@analog.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Alexandru Ardelean &lt;aardelean@deviqon.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7124: Fix potential overflow due to non sequential channel numbers</title>
<updated>2021-05-13T15:32:55Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-05-13T12:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f2a772c51206b0c3f262e4f6a3812c89a650191b'/>
<id>urn:sha1:f2a772c51206b0c3f262e4f6a3812c89a650191b</id>
<content type='text'>
Channel numbering must start at 0 and then not have any holes, or
it is possible to overflow the available storage.  Note this bug was
introduced as part of a fix to ensure we didn't rely on the ordering
of child nodes.  So we need to support arbitrary ordering but they all
need to be there somewhere.

Note I hit this when using qemu to test the rest of this series.
Arguably this isn't the best fix, but it is probably the most minimal
option for backporting etc.

Alexandru's sign-off is here because he carried this patch in a larger
set that Jonathan then applied.

Fixes: d7857e4ee1ba6 ("iio: adc: ad7124: Fix DT channel configuration")
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Alexandru Ardelean &lt;aardelean@deviqon.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7124: Fix missbalanced regulator enable / disable on error.</title>
<updated>2021-05-13T15:32:39Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-05-13T12:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4573472315f0fa461330545ff2aa2f6da0b1ae76'/>
<id>urn:sha1:4573472315f0fa461330545ff2aa2f6da0b1ae76</id>
<content type='text'>
If the devm_regulator_get() call succeeded but not the regulator_enable()
then regulator_disable() would be called on a regulator that was not
enabled.

Fix this by moving regulator enabling / disabling over to
devm_ management via devm_add_action_or_reset.

Alexandru's sign-off here because he pulled Jonathan's patch into
a larger set which Jonathan then applied.

Fixes: b3af341bbd96 ("iio: adc: Add ad7124 support")
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Alexandru Ardelean &lt;aardelean@deviqon.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: tsl2583: Fix division by a zero lux_val</title>
<updated>2021-05-10T13:01:48Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2021-05-07T18:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af0e1871d79cfbb91f732d2c6fa7558e45c31038'/>
<id>urn:sha1:af0e1871d79cfbb91f732d2c6fa7558e45c31038</id>
<content type='text'>
The lux_val returned from tsl2583_get_lux can potentially be zero,
so check for this to avoid a division by zero and an overflowed
gain_trim_val.

Fixes clang scan-build warning:

drivers/iio/light/tsl2583.c:345:40: warning: Either the
condition 'lux_val&lt;0' is redundant or there is division
by zero at line 345. [zerodivcond]

Fixes: ac4f6eee8fe8 ("staging: iio: TAOS tsl258x: Device driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
