alistair23-linux/drivers/iio
Linus Walleij 702a7b8e06 iio: trigger: helpers to determine own trigger
This adds a helper function to the IIO trigger framework:

iio_trigger_using_own(): for an IIO device, this tells
  whether the device is using itself as a trigger.
  This is true if the indio device:
  (A) supplies a trigger and
  (B) has assigned its own buffer poll function to use this
      trigger.

This helper function is good when constructing triggered,
buffered drivers that can either use its own hardware *OR*
an external trigger such as a HRTimer or even the trigger from
a totally different sensor.

Under such circumstances it is important to know for example
if the timestamp from the same trigger hardware should be used
when populating the buffer: if iio_trigger_using_own() is true,
we can use this timestamp, else we need to pick a unique
timestamp directly in the trigger handler.

For this to work of course IIO devices registering hardware
triggers must follow the convention to set the parent device
properly, as as well as setting the parent of the IIO device
itself.

When a new poll function is attached, we check if the parent
device of the IIO of the poll function is the same as the
parent device of the trigger and in that case we conclude that
the hardware is using itself as trigger.

Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Cc: Crestez Dan Leonard <leonard.crestez@intel.com>
Cc: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-10 16:49:14 +01:00
..
accel iio: accel: mxc6255 add support for the mxc6225 2016-09-05 21:18:16 +01:00
adc iio: adc: at91: Add support for Touchscreen Switches Closure Time 2016-09-05 21:11:21 +01:00
amplifiers
buffer iio: add resource managed triggered buffer init helpers 2016-09-04 15:42:46 +01:00
chemical iio: chemical: vz89x: fix boolreturn.cocci warnings 2016-09-03 17:49:53 +01:00
common iio: st_sensors: fix errorcheck for regulators 2016-09-03 17:25:54 +01:00
dac iio: stx104: Add IIO support for the ADC channels 2016-09-03 17:25:53 +01:00
dummy iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
frequency
gyro iio: bmg160: add callbacks for the filter frequency 2016-07-03 12:39:55 +01:00
health First round of IIO new device support, features and cleanups for the 4.8 cycle. 2016-06-09 09:15:58 -07:00
humidity iio: humidity: hdc100x: add HDC1000 and HDC1008 to Kconfig 2016-08-15 17:10:56 +01:00
imu Third set of IIO new device support, features and cleanups for the 4.8 cycle. 2016-07-14 12:05:29 +09:00
light iio: light: us5182d: Add missing error code assignment before test 2016-08-15 16:49:43 +01:00
magnetometer iio: magn: ak8974: remove .owner field for driver 2016-08-29 20:12:10 +01:00
orientation
potentiometer iio: potentiometer: Fix typo in Kconfig 2016-07-03 12:40:01 +01:00
pressure iio: fetch and enable regulators unconditionally 2016-09-05 21:08:40 +01:00
proximity iio: sx9500: add final devicetree support 2016-09-03 15:26:28 +01:00
temperature iio: temperature: fix non static symbol warnings 2016-08-29 19:49:00 +01:00
trigger iio:trigger: Experimental kthread tight loop trigger (thread only) 2016-06-03 13:18:44 +01:00
iio_core.h iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
iio_core_trigger.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c iio: add resource managed triggered buffer init helpers 2016-09-04 15:42:46 +01:00
industrialio-event.c iio: iio_push_event(): Don't crash if the event interface is not registered 2016-09-10 16:40:44 +01:00
industrialio-sw-device.c iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: helpers to determine own trigger 2016-09-10 16:49:14 +01:00
industrialio-triggered-event.c
inkern.c iio: core: Add devm_ APIs for iio_channel_{get,release}_all 2016-04-19 19:58:15 +01:00
Kconfig iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00
Makefile iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00