<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/include/linux/iio/common, branch v4.7</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v4.7</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2016-05-29T19:21:41+00:00</updated>
<entry>
<title>iio: st_sensors: switch to a threaded interrupt</title>
<updated>2016-05-29T19:21:41+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-05-21T18:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=65925b65ed98ffdb277cf5ea1af45731dac0b30b'/>
<id>urn:sha1:65925b65ed98ffdb277cf5ea1af45731dac0b30b</id>
<content type='text'>
commit 98ad8b41f58dff6b30713d7f09ae3834b8df7ded
("iio: st_sensors: verify interrupt event to status") caused
a regression when reading ST sensors from a HRTimer trigger
rather than the intrinsic interrupts: the HRTimer may
trigger faster than the sensor provides new values, and
as the check against new values available as a cause of
the interrupt trigger was done in the poll function,
this would bail out of the HRTimer interrupt with
IRQ_NONE.

So clearly we need to only check the new values available
from the proper interrupt handler and not from the poll
function, which should rather just read the raw values
from the registers, put them into the buffer and be happy.

To achieve this: switch the ST Sensors over to using a true
threaded interrupt handler.

In the interrupt thread, check if new values are available,
else yield to the (potential) next device on the same
interrupt line to check the registers. If the interrupt
was ours, proceed to poll the values.

Instead of relying on iio_trigger_generic_data_rdy_poll() as
a top half to wake up the thread that polls the sensor for
new data, have the thread call iio_trigger_poll_chained()
after determining that is is the proper source of the
interrupt. This is modelled on drivers/iio/accel/mma8452.c
which is already using a properly threaded interrupt handler.

In order to get the same precision in timestamps as
previously, where samples would be timestamped in the
poll function pf-&gt;timestamp when calling
iio_trigger_generic_data_rdy_poll() we introduce a
local timestamp in the sensor data, set it in the top half
(fastpath) of the interrupt handler and provide that to the
core when calling iio_push_to_buffers_with_timestamp().

Additionally: if the active scanmask is not set for the
sensor no IRQs should be enabled and we need to bail out
with IRQ_NONE. This can happen if spurious IRQs fire when
installing the threaded interrupt handler.

Tested with hard interrupt triggers on LIS331DL, then also
tested with hrtimers on the same sensor by creating a 75Hz
HRTimer and using it to poll the sensor.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Giuseppe Barba &lt;giuseppe.barba@st.com&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Reported-by: Crestez Dan Leonard &lt;cdleonard@gmail.com&gt;
Tested-by: Crestez Dan Leonard &lt;cdleonard@gmail.com&gt;
Tested-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Fixes: 97865fe41322 ("iio: st_sensors: verify interrupt event to status")
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: support open drain mode</title>
<updated>2016-04-19T18:58:13+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-04-14T08:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=0e6f6871a1591f4bb0971809c45bc91a991f1967'/>
<id>urn:sha1:0e6f6871a1591f4bb0971809c45bc91a991f1967</id>
<content type='text'>
Some types of ST Sensors can be connected to the same IRQ line
as other peripherals using open drain. Add a device tree binding
and a sensor data property to flip the right bit in the interrupt
control register to enable open drain mode on the INT line.

If the line is set to be open drain, also tag on IRQF_SHARED
to the IRQ flags when requesting the interrupt, as the whole
point of using open drain interrupt lines is to share them with
more than one peripheral (wire-or).

Cc: devicetree@vger.kernel.org
Cc: Giuseppe Barba &lt;giuseppe.barba@st.com&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Acked-by: Rob Herring &lt;rob@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: verify interrupt event to status</title>
<updated>2016-04-19T18:58:12+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-03-24T13:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=97865fe41322d83dac4373fe0a0de5b1a1b318c5'/>
<id>urn:sha1:97865fe41322d83dac4373fe0a0de5b1a1b318c5</id>
<content type='text'>
This makes all ST sensor drivers check that they actually have
new data available for the requested channel(s) before claiming
an IRQ, by reading the status register (which is conveniently
the same for all ST sensors) and check that the channel has new
data before proceeding to read it and fill the buffer.

This way sensors can share an interrupt line: it can be flaged
as shared and then the sensor that did not fire will return
NO_IRQ, and the sensor that fired will handle the IRQ and
return IRQ_HANDLED.

Cc: Giuseppe Barba &lt;giuseppe.barba@st.com&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: support active-low interrupts</title>
<updated>2016-01-10T12:35:32+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-11-19T09:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a9fd053b56c6bb14972ab7a19da0b575fe4c5d66'/>
<id>urn:sha1:a9fd053b56c6bb14972ab7a19da0b575fe4c5d66</id>
<content type='text'>
Most ST MEMS Sensors that support interrupts can also handle sending
an active low interrupt, i.e. going from high to low on data ready
(or other interrupt) and thus triggering on a falling edge to the
interrupt controller.

Set up logic to inspect the interrupt line we get for a sensor: if
it is triggering on rising edge, leave everything alone, but if it
triggers on falling edges, set up active low, and if unsupported
configurations appear: warn with errors and reconfigure the interrupt
to a rising edge, which all interrupt generating sensors support.

Create a local header for st_sensors_core.h to share functions
between the sensor core and the trigger setup code.

Cc: Giuseppe Barba &lt;giuseppe.barba@st.com&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: add debugfs register read hook</title>
<updated>2015-08-16T09:51:25+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-08-12T08:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a0175b9c76f59c1f5706f986d690e27ba06363dd'/>
<id>urn:sha1:a0175b9c76f59c1f5706f986d690e27ba06363dd</id>
<content type='text'>
This adds a debugfs hook to read/write registers in the ST
sensors using debugfs. Proved to be awesome help when trying
to debug why IRQs do not arrive.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: st-sensors: add configuration for WhoAmI address</title>
<updated>2015-07-23T19:43:04+00:00</updated>
<author>
<name>Giuseppe Barba</name>
<email>giuseppe.barba@st.com</email>
</author>
<published>2015-07-21T08:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=bc27381edbeb654d819b7e1464091c456a0d3e64'/>
<id>urn:sha1:bc27381edbeb654d819b7e1464091c456a0d3e64</id>
<content type='text'>
This patch permits to configure the WhoAmI register address
because some device could have not a standard address for
this register.

Signed-off-by: Giuseppe Barba &lt;giuseppe.barba@st.com&gt;
Reviewed-by: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Acked-by: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: common: ssp_sensors: Add sensorhub driver</title>
<updated>2015-01-29T18:49:05+00:00</updated>
<author>
<name>Karol Wrona</name>
<email>k.wrona@samsung.com</email>
</author>
<published>2015-01-28T14:05:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=50dd64d57eee8aed1a86e875ce77d078e44fad00'/>
<id>urn:sha1:50dd64d57eee8aed1a86e875ce77d078e44fad00</id>
<content type='text'>
Sensorhub  is MCU dedicated to collect data and manage several sensors.
Sensorhub is a spi device which provides a layer for IIO devices. It provides
some data parsing and common mechanism for sensorhub sensors.

Adds common sensorhub library for sensorhub driver and iio drivers
which uses sensorhub MCU to communicate with sensors.

Signed-off-by: Karol Wrona &lt;k.wrona@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio:imu: changed structure name from st_sensors to st_sensor_settings</title>
<updated>2014-10-04T10:23:13+00:00</updated>
<author>
<name>Denis CIOCCA</name>
<email>denis.ciocca@st.com</email>
</author>
<published>2014-10-03T15:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a7ee8839daf21c4a3ca439733e7bed25f32e7954'/>
<id>urn:sha1:a7ee8839daf21c4a3ca439733e7bed25f32e7954</id>
<content type='text'>
This patch change structure name and related variables names.

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: st_sensors: add devicetree probing support</title>
<updated>2014-07-11T20:09:49+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-08-07T07:16:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=2d7768a872b73a7105d6355948dae0acff72f061'/>
<id>urn:sha1:2d7768a872b73a7105d6355948dae0acff72f061</id>
<content type='text'>
The I2C devices that make up the STMicroelectronics MEMS sensors
may be sneakily enabled by cleverly giving the device node the same
name as a string match from the platform device ID table. However
the right method is to use the compatible string.

On detection, the ST sensors use the ID string to probe and
instatiate the right sensor driver, so pass the kernel-internal ID
string in the .data field of the OF match table, and set the I2C
client name to this name when a compatible match is used.

This avoids having misc Linux-specific strings floating around in
the device tree.

Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Denis CIOCCA &lt;denis.ciocca@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio:st sensors: remove custom sampling frequence attribute in favour of core support.</title>
<updated>2014-07-07T08:39:57+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>jic23@kernel.org</email>
</author>
<published>2014-06-22T19:59:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=2d239c9e92087d5f4f667371ae350db9f76e3191'/>
<id>urn:sha1:2d239c9e92087d5f4f667371ae350db9f76e3191</id>
<content type='text'>
This allows in kernel client drivers to access this

Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Reviewed-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
</content>
</entry>
</feed>
