<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/iio, branch v3.12.70</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.70</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.70'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-09-30T08:59:50Z</updated>
<entry>
<title>iio: Add inverse unit conversion macros</title>
<updated>2015-09-30T08:59:50Z</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2015-08-05T13:38:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2e42c785118a9ab1e7fccd5b837b2220c7398ea5'/>
<id>urn:sha1:2e42c785118a9ab1e7fccd5b837b2220c7398ea5</id>
<content type='text'>
commit c689a923c867eac40ed3826c1d9328edea8b6bc7 upstream.

Add inverse unit conversion macro to convert from standard IIO units to
units that might be used by some devices.

Those are useful in combination with scale factors that are specified as
IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will
contain the maximum raw value the sensor will generate and the numerator
the value it maps to in a specific unit. Sometimes datasheets specify those
in different units than the standard IIO units (e.g. degree/s instead of
rad/s) and so we need to do a unit conversion.

From a mathematical point of view it does not make a difference whether we
apply the unit conversion to the numerator or the inverse unit conversion
to the denominator since (x / y) / z = x / (y * z). But as the denominator
is typically a larger value and we are rounding both the numerator and
denominator to integer values using the later method gives us a better
precision (E.g. the relative error is smaller if we round 8000.3 to 8000
rather than rounding 8.3 to 8).

This is where in inverse unit conversion macros will be used.

Marked for stable as used by some upcoming fixes.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask</title>
<updated>2014-12-06T14:18:14Z</updated>
<author>
<name>Cristina Ciocan</name>
<email>cristina.ciocan@intel.com</email>
</author>
<published>2014-11-11T14:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7abd18f7bad812dbab0bca2492d55a9800dcd479'/>
<id>urn:sha1:7abd18f7bad812dbab0bca2492d55a9800dcd479</id>
<content type='text'>
commit ccf54555da9a5e91e454b909ca6a5303c7d6b910 upstream.

The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask
in order to retrieve it, that is 0x7F, not 0xCF as it is now.

Fixes: ade7ef7ba (staging:iio: Differential channel handling)
Signed-off-by: Cristina Ciocan &lt;cristina.ciocan@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>iio:trigger: modify return value for iio_trigger_get</title>
<updated>2014-10-13T13:41:12Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2014-08-22T20:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0735fe8ac425e749ba6417eb95ee194b8100a393'/>
<id>urn:sha1:0735fe8ac425e749ba6417eb95ee194b8100a393</id>
<content type='text'>
commit f153566570fb9e32c2f59182883f4f66048788fb upstream.

Instead of a void function, return the trigger pointer.

Whilst not in of itself a fix, this makes the following set of
7 fixes cleaner than they would otherwise be.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>iio: trigger: implement devm_iio_trigger_alloc/devm_iio_triger_free</title>
<updated>2013-08-17T18:34:52Z</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2013-08-16T13:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d536321df392ee0db6a5e92d98f0303020315f40'/>
<id>urn:sha1:d536321df392ee0db6a5e92d98f0303020315f40</id>
<content type='text'>
Add a resource managed devm_iio_trigger_alloc()/devm_iio_triger_free()
to automatically clean up triggers allocated by IIO drivers, thus
leading to simplified IIO drivers code.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Kyunmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.11-rc5 into staging-next</title>
<updated>2013-08-12T17:22:49Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-08-12T17:22:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fbf8d7106c926d375c76e65cc878f4fa7b91cbc3'/>
<id>urn:sha1:fbf8d7106c926d375c76e65cc878f4fa7b91cbc3</id>
<content type='text'>
We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: Fix documentation of devm_iio_device_free()</title>
<updated>2013-08-03T21:21:53Z</updated>
<author>
<name>Peter Meerwald</name>
<email>pmeerw@pmeerw.net</email>
</author>
<published>2013-07-29T21:35:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9bc541028b2b93962e0bebce62ce6e295aab2086'/>
<id>urn:sha1:9bc541028b2b93962e0bebce62ce6e295aab2086</id>
<content type='text'>
Signed-off-by: Peter Meerwald &lt;pmeerw@pmeerw.net&gt;
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: Oleksandr Kravchenko &lt;o.v.kravchenko@globallogic.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: core: implement devm_iio_device_alloc/devm_iio_device_free</title>
<updated>2013-08-03T17:40:37Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2013-07-18T10:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9dabaf5eddbafa21aded7c063cb38d2e8936c237'/>
<id>urn:sha1:9dabaf5eddbafa21aded7c063cb38d2e8936c237</id>
<content type='text'>
Add a resource managed devm_iio_device_alloc()/devm_iio_device_free()
to automatically clean up any allocations made by IIO drivers,
thus leading to simplified IIO drivers code.

In addition, this will allow IIO drivers to use other devm_*() API
(like devm_request_irq) and don't care about the race between
iio_device_free() and the release of resources by Device core
during driver removing.

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Oleksandr Kravchenko &lt;o.v.kravchenko@globallogic.com&gt;
Tested-by: Oleksandr Kravchenko &lt;o.v.kravchenko@globallogic.com&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: Remove IIO_DEV_ATTR_RESET macro</title>
<updated>2013-08-03T17:40:37Z</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2013-07-16T15:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=60b188f0d679656a1a2603d3bc1fa005373f4b9c'/>
<id>urn:sha1:60b188f0d679656a1a2603d3bc1fa005373f4b9c</id>
<content type='text'>
There are no users of this macro left and we have come to the conclusion that it
is not a good idea to expose the raw chip reset to userspace so the macro is
very unlikely to be used in new drivers.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: Added ST-sensors platform data to select the DRDY interrupt pin</title>
<updated>2013-08-03T17:40:28Z</updated>
<author>
<name>Denis CIOCCA</name>
<email>denis.ciocca@st.com</email>
</author>
<published>2013-06-19T08:28:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=23cde4d65cc7d11e2048d2b240cdf13927ac50d0'/>
<id>urn:sha1:23cde4d65cc7d11e2048d2b240cdf13927ac50d0</id>
<content type='text'>
This patch add support to redirect the DRDY interrupt on INT1 or INT2
on accelerometer and pressure sensors.

Signed-off-by: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio:trigger: Fix use_count race condition</title>
<updated>2013-07-20T09:18:53Z</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2013-07-16T14:28:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1a8e1dc111d6f05e7164e851e58219d428359e1'/>
<id>urn:sha1:a1a8e1dc111d6f05e7164e851e58219d428359e1</id>
<content type='text'>
When using more than one trigger consumer it can happen that multiple threads
perform a read-modify-update cycle on 'use_count' concurrently. This can cause
updates to be lost and use_count can get stuck at non-zero value, in which case
the IIO core assumes that at least one thread is still running and will wait for
it to finish before running any trigger handlers again. This effectively renders
the trigger disabled and a reboot is necessary before it can be used again. To
fix this make use_count an atomic variable. Also set it to the number of
consumers before starting the first consumer, otherwise it might happen that
use_count drops to 0 even though not all consumers have been run yet.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Tested-by: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
</feed>
