linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add parent_trigger attribute to triggers
@ 2017-02-24 14:48 Benjamin Gaignard
  2017-02-24 14:48 ` [PATCH v3 1/2] iio: Allow triggers to be used as parent of others triggers Benjamin Gaignard
  2017-02-24 14:48 ` [PATCH v3 2/2] iio: stm32 trigger: Implement parent trigger feature Benjamin Gaignard
  0 siblings, 2 replies; 8+ messages in thread
From: Benjamin Gaignard @ 2017-02-24 14:48 UTC (permalink / raw)
  To: linux-kernel, jic23, linux-iio, knaack.h, lars, pmeerw
  Cc: fabrice.gasnier, linaro-kernel, benjamin.gaignard,
	Benjamin Gaignard

version 3:
- try to provide better description of parent_trigger usages
- add one channel to get counter raw value

version 2:
- Do not automatically set parent_trigger attribute on all triggers.
  Let driver decide to use it.
- Improve documentation of parent_trigger
- Improve slave modes documentation

Thoses patches add parent_trigger attribute to IIO triggers.
Parent trigger edges or levels could be used to control current
trigger. For example current trigger could be started on parent
rising edges or be enabled only when parent trigger level is high.

Since there is many ways to use parent edges and levels to
control current trigger behavoir an additional custom sysfs
attribute may be needed to describe those control modes.

Similary to what already exist to validate a device, a new (optional) 
validate_trigger function is added in iio_trigger structure and should be
filled by drivers.

For STM32 triggers parent trigger edges or levels could used in various ways.
To be able to select them "in_count0_count_mode" attribute is added to STM32
triggers.

When setting a parent trigger on STM32 trigger "trigger_rising_edges" mode
is automatically set so current trigger is clock by the rising edges of it
parent.

Benjamin Gaignard (2):
  iio: Allow triggers to be used as parent of others triggers
  iio: stm32 trigger: Implement parent trigger feature

 .../ABI/testing/sysfs-bus-iio-timer-stm32          |  63 +++++
 .../ABI/testing/sysfs-bus-iio-trigger-sysfs        |  15 ++
 drivers/iio/industrialio-trigger.c                 |  69 ++++++
 drivers/iio/trigger/stm32-timer-trigger.c          | 256 ++++++++++++++++++++-
 include/linux/iio/trigger.h                        |   7 +-
 include/linux/mfd/stm32-timers.h                   |   2 +
 6 files changed, 405 insertions(+), 7 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2017-03-05 10:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-24 14:48 [PATCH v3 0/2] Add parent_trigger attribute to triggers Benjamin Gaignard
2017-02-24 14:48 ` [PATCH v3 1/2] iio: Allow triggers to be used as parent of others triggers Benjamin Gaignard
2017-02-25 17:57   ` Jonathan Cameron
2017-02-24 14:48 ` [PATCH v3 2/2] iio: stm32 trigger: Implement parent trigger feature Benjamin Gaignard
2017-02-25 17:53   ` Jonathan Cameron
2017-02-26 14:59     ` Benjamin Gaignard
2017-02-26 15:03       ` Benjamin Gaignard
2017-03-05 10:18         ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).