All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] Add IIO trigger symlink in iio:device0/trigger/
@ 2015-04-16  9:01 Robert Dolca
  2015-04-16  9:01 ` [PATCH RFC 1/3] iio: Add symlink to triggers in the device's trigger folder Robert Dolca
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Robert Dolca @ 2015-04-16  9:01 UTC (permalink / raw)
  To: linux-iio, Jonathan Cameron
  Cc: linux-kernel, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
	Robert Dolca, Denis CIOCCA

Currently the user space applications write the trigger name in the
current_trigger file. The user space application should know what trigger to
use. The association can be manually configured or can be "detected" based
on the trigger's name if the triggers name has the device's index in the name
or any other custom and unstandard convention.

This issue is being fixed by these patches. They create a symlink in the
device's trigger folder for all triggers registered by the device.

/ # ls -l /sys/bus/iio/devices/iio:device0/trigger/
total 0
-rw-r--r--    1 root     root          4096 Apr 16 08:33 current_trigger
lrwxrwxrwx    1 root     root             0 Apr 16 08:33 trigger0 -> ../../trigg
er0

This way the user space application can know what triggers were registered by
the device.

The 1st patch adds the main functionality (creating symlink if the trigger was
registered before the device was registered).

The 2nd patch improves the functionality allowing to register a trigger after
the IIO device was registered and the symlink is being created.

In the final patch there is an example on how to use this new API.

Robert Dolca (3):
  iio: Add symlink to triggers in the devoce's trigger folder
  iio: Improve iio_trigger_register_with_dev to register trigger after
    device
  iio: Use with iio_trigger_register_with_dev to register trigger

 drivers/iio/common/st_sensors/st_sensors_trigger.c |  2 +-
 drivers/iio/industrialio-core.c                    | 24 ++++++++
 drivers/iio/industrialio-trigger.c                 | 70 ++++++++++++++++++++++
 include/linux/iio/iio.h                            |  2 +
 include/linux/iio/trigger.h                        | 24 ++++++++
 5 files changed, 121 insertions(+), 1 deletion(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-05-13 18:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16  9:01 [PATCH RFC 0/3] Add IIO trigger symlink in iio:device0/trigger/ Robert Dolca
2015-04-16  9:01 ` [PATCH RFC 1/3] iio: Add symlink to triggers in the device's trigger folder Robert Dolca
2015-05-08 15:11   ` Jonathan Cameron
2015-05-12 16:56     ` Lars-Peter Clausen
2015-05-12 19:06       ` Jonathan Cameron
2015-05-13  7:28         ` Lars-Peter Clausen
2015-05-13 17:42           ` Jonathan Cameron
2015-05-13 18:00             ` Robert Dolca
2015-05-13 18:03             ` Robert Dolca
2015-05-13 18:05               ` Lars-Peter Clausen
2015-05-13 18:09                 ` Lars-Peter Clausen
2015-05-12 13:44   ` Daniel Baluta
2015-04-16  9:01 ` [PATCH RFC 2/3] iio: Improve iio_trigger_register_with_dev to register trigger after device Robert Dolca
2015-05-12 13:46   ` Daniel Baluta
2015-04-16  9:01 ` [PATCH RFC 3/3] iio: Use with iio_trigger_register_with_dev to register trigger Robert Dolca

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.